Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+20 votes
10.2k views
in Plugins by
edited by

you probably remember Tag Descriptions Plugin from the plugin tutorial. this is a necessary plugin for better SEO.

now I updated Gideon's original code to add a few features:

Dowload Zip file

Or check it on Github

Demo and ScreenShot from a simple tag with image:

new features:

  • Icons in tags, just like stackoverflow.com
  • diffrent "title" attribute from widget content for better SEO and preventing problems with HTML in it's content
  • HTML support in description(as an option)
  • now it applies these changes to 'Tags' page too

enjoy it and feel free to fork.


Updates:

  • I had diffrent versions of this plugin on multiple sites & made a mistake and pushed wrong files on github. it's updated now and new version should work correctly. thank James Spittal for reporting.
  • now this plugin won't add "Link Title" & "Icon Image" to tags in "Tag" page. thanks Jurrek for informing me.
  • in new update it now uses DOM Document to handle links instead of original method(sting manipulation:preg)
  • thanks to @Another one & @maxjtechno for reporting the problem, now subscription image for tags will show up.

Best Regards

QA-Themes.com

by
I wonder why would anyone downvote this.
by
–1
for the joy of trolling :)
by
I think this is great plugin. Does anybody use it? Why is there no discussion?
by
I use it, and it works fine.
by
great plugin! I installed on 1,7 and its working. Is it ok to use in q2a recent versions?

8 Answers

+3 votes
by
Can you please provide us the working demo of the website with this plugin enabled?
0 votes
by
edited by

Just tried this on my site (http://merspi.com.au) and caused a strange error.

I put it in the qa-plugin folder, and then visited the 'Pages' section in the admin panel and the server returns a 500 error message. When I rm -rf q2a-tag-descriptions/ - it appears that the problem disappears and the site returns to normal.

Anyone experienced anything similar? I'd love to get this working - because it's a plug-in I'd like to use!

From my error log:

[Sat Jun 15 12:03:01 2013] [error] [client 124.148.169.41] PHP Fatal error:  require_once(): Failed opening required '/var/www/qa-plugin/q2a-tag-descriptions/qa-tag-desc-edit.php' (include_path='.:/usr/sharephp:/usr/share/pear') in /var/www/qa-include/qa-base.php on line 632, referer: http://merspi.com.au/admin/permissions
[Sat Jun 15 12:03:03 2013] [error] [client 124.148.169.41] PHP Warning:  file_get_contents(/var/www/qa-plugin/q2a-tag-descriptions/qa-tag-desc-overrides.php): failed to open stream: No such file or directoryin /var/www/qa-include/qa-base.php on line 317, referer: http://merspi.com.au/account
 
Managed to resolve this issue by downloading http://www.question2answer.org/releases/q2a-tag-descriptions-tutorial.zip and installing that before grabbing the github repository. My bad!
 
All resolved.
 
 
by
it seems that I uploaded an an old version on github. I will fix it soon.
by
I uploaded wrong files to git, it should work now.
by
Thanks @Towhid! Much appreciated.
0 votes
by
reshown by
Useful this user-selectable option:
 
Enable tag links as external url links
 
Enable tag links as tag-images

best determined separately for each tag in the edit panel tag, and the default for all as the picture or the link url in the admin panel.

by
I updated this plugin, please update and tell me if it's fixed!
by
It is well, the current version no longer displays the string (TAG_ICON).
  However does not work simple text formatting, for example - a new line by the enter key. When you save the new line disappears from the tag-description.
by
And if you can set up your script in order to url links in tag-description may have been active?
by
edited by
This feature will be useful for us if it works, because we will export our extended tag descriptions to another place and use only short versions directly on our site.

How can I link to an external site, such as

http://psiepsilon.wikia.com/wiki/Mathematics_and_Physics_Wiki

in the tag description? Simply putting in the URL does not work.
+2 votes
by

Thanks, great plugin but it needs to be updated, star when subscribing to tag doesn't show up:

by
ok, I'll check it out and update the plugin.
by
Nice, looking forward to update :)
by
I confirm the issue (I was using the plugin but I did not notice it ....)
by
Thanks for reporting the problem, it's fixed in new version.
cheers
by
Got error in every page after uploading plugin files:

"of /*****/*******/*******/*******/qa-plugin/q2a-tag-descriptions-master/qa-tag-desc-layer.php
Fatal error: Class 'qa_layer_14_from_qa_tag_desc_layer_php' not found in /*****/*******/*******/*******/qa-include/qa-base.php(510) : eval()'d code on line 7"

Keep in mind i been using old tag descriptions plugin from another developer if it matters. Removed it ofcourse before installing yours.

Thanks for fixes.
by
I checked this plugin again both on a live site and a new installation and there was no problem with it.
either plugin files uploaded to server were damaged or incomplete or you have another plugin which isn't compatible with this one. make sure you do this:
1. if you have any other version of this plugin, remove it from your plugin directory.
2. visit plugin page in your admin panel, so list of active plugins will be updated.
3. upload this plugin and make sure all files are correctly uploaded.

also I just edited the plugin and changed layer name so it will decrease chance of incompatibility in case you still have the old version. if this didn't work you can also go back to Gideon's original plugin: http://question2answer.org/releases/q2a-tag-descriptions-tutorial.zip
by
on a new 1.6.2 instance (no plugins installed) I have this issue installing the new version of the plugin :

Parse error: syntax error, unexpected '@' in ******\Apache2.2\htdocs\q2a\qa-include\qa-base.php(510) : eval()'d code on line 33
of *******/Apache2.2/htdocs/q2a/qa-plugin/q2a-tag-descriptions-master/qa-tag-desc-layer.php
Fatal error: Class 'qa_layer_4_from_qa_tag_desc_layer_php' not found in *******\Apache2.2\htdocs\q2a\qa-include\qa-base.php(510) : eval()'d code on line 27

q2a does not start at all.....
by
strangely I don't get a single error or warning on my php 5.2 and q2a 1.6 instance and it runs smoothly. @ was added to suppress the warning when variable was empty. I have no idea why your apache returns an error for it. any way, I removed them. can you try again and tell me how it's going?
thanks
by
Now q2a starts, but on the error_log I can see many lines same this one :

PHP Warning:  DOMDocument::saveHTML() expects exactly 0 parameters, 1 given in *******\\Apache2.2\\htdocs\\q2a\\qa-include\\qa-base.php(510) : eval()'d code on line 52

(if I use the plugin, I do not see tooltips with desc or images on the edited tags)
by
it seems that this error happens on PHP's old versions(older than 5.3.6). I'm trying to fix it now.
by
ok, thanks, I'm using 5.3.10
by
anyway, It's fixed. please update the plugin and tell me if there is a problem.
by
edited by
ok it works now, thanks.

One question:

inside the tag now I have :
"tag name" + [icon img]

while with the previous version (Tag Descriptions 1.0) I had :

[icon img] + "tag name" (a la stackoverflow)

Is this change wanted ?

ps
there is also a small typo here
https://github.com/Towhidn/q2a-tag-descriptions/blob/master/qa-plugin.php#L4
(you can notice it in the plugin's admin option panel)
:-)
by
yes, you have to send the image to left using CSS:
.qa-tag-img {
    float: left;
}
and thanks for correction.
by
Inserting
.qa-tag-img {
    float: left;
}
inside my styles.css does not have any effect...
by
I've replaced the line 41 here :
https://github.com/Towhidn/q2a-tag-descriptions/blob/master/qa-tag-desc-layer.php#L41

from :
$a->appendChild($element);
to :
$a->insertBefore($element, $a->firstChild);

and I have again the previous behaviour (image node before text node).
It seems to work...
by
ehm... don't be angry with me ... :-)
typo :-)

https://github.com/Towhidn/q2a-tag-descriptions/blob/master/qa-tag-desc-layer.php#L40

height :-)
by
thanks for reporting both typo and suggesting update, I applied both. also in new version I added support for "Tags" page too.
by
Thanks a lot !
0 votes
by

There is character problem. When I copied this plugin, the all tags had character problem. Example the "segítség" tag changed to "segítség". I use utf 8.

by
by
But I can't use icon. After I tried with Github version, which is character problem too.
by
hi, I solved this issue in new version. update your plugin :)
+1 vote
by
whether it is possible to make the description of the findings in more <meta name = "description" content = " ??
by
good idea, in next version I'll add option to enable meta tags.
by
I decided to add this feature and many other features in an upcoming Q2A SEO plugin.
by
when will the update
0 votes
by
edited by
Hi Towhid,

I am using this plugin from you and I just realized how many other plugins you have published on Github:

https://github.com/Towhidn?tab=repositories

This is really great, thanks lot for your efforts!

I would suggest only a very small, but important change in your github repositories:

Please don´t use another subfolder for the plugin. Always start with the main directory of the repository.

Reason:

If I am cloning the git repository the plugin is not found:
/qa-plugin/ > git clone https://github.com/Towhidn/q2a-tag-descriptions.git

puts all files in the following subdirectory and the plugin therefore is not found by the admin.

/qa-plugin/q2a-tag-descriptions/q2a-tag-description

 

Hope you can change this soon for all your plugins, so that updating your plugins in the future will be very easy with just:
/qa-plugin/q2a-tag-descriptions > git pull

Thanks again for your efforts!

EDIT:
for the moment i am just using a symlink to the subdirectory:
ln -s q2a-tag-descriptions/q2a-tag-description q2a-tag-descriptions-link
it doubles my number of links in the plugin-directory for the extensions, but it reduces complexity.
by
It's possible with "sparsecheckout" or using a command like this:
http://www.tikalk.com/cloning-checking-out-certain-folder-git-repository.

having files in root troubled some newbie users who downloaded and extracted the files to upload them. also I'm planning to add a directory for each plugin's documentation and files for changelog and credits to the root. so having plugin in the root would be a mess.
by
thanks for the sparsecheckout tip:
http://jasonkarns.com/blog/subdirectory-checkouts-with-git-sparse-checkout/
could be a solution, thanks for this hint.

I still suggest, that you could place the documentation in a /doc subdirectory as well as the other stuff:
/credits
/changelog
And only leave the readme file with the plugin in the root.
0 votes
by
Hi guys, Id like to now if I can use this plugin in q2a 1.8 tnks!
by
Hi, it is working file for my 1.8 Q2A website
...