[Plugin: Link Library] Accessible AJAX links display
The AJAX display is working fine on my live site using the latest version of Link Library:
Could you give me a link to a page where you are trying to enable AJAX mode so that I could see what is happening. I am not fully understanding from your description of the issue.
The whole point of the AJAX mode is to only show one category at a time, so I am not sure why you are asking me to show all categories.
Thanks for your quick reply.
Let’s take a simple example : your website.
- Click on any anchor link in #linktable
- Here you are : you cannot access to the related links.
This problem is caused by 3 things :
- The regular target of these links prints : http://yannickcorner.nayanna.biz/freeware-database-ajax-version/#, however the hash doesn’t rely on any active and valid anchor in your HTML document.
- Each link list (.linklisttable) is hidden by default except the first one.
All of these elements block your plugin’s accessibilty.
Fixing this is quite easy 🙂
- Display *all* the links which the use chose to display on the page. Each link inside #linktable will have a *real* anchor, like this :
<a onclick="showLinkCat('29', '3', 1);return false;" href="http://yannickcorner.nayanna.biz/freeware-database-ajax-version/#utility-links">Utilities</a>
Note that after the hash, we tell the link to link to the #utility-links box, which we assume would contain all the links listed un der the Utilities category.
Let me know if that’s clearer, otherwise I’ll send you an email in French 🙂 I can help you to fix it, too.
Yes, the AJAX mode is optional : however, there is no reason it shouldn’t be accessible, too. Moreover when the required changes are small.
Anyway, that’s the difference that would make your great plugin a reference plugin 🙂
I am finally getting time to loop back to this item. After re-reading through the thread, I am still not sure of the best solution. When you select to run your link library in AJAX mode, it only generates a single category at a time. it then performs an asynchronous query to load other categories dynamically. What you are saying about rendering all categories and jumping to them is essentially the way that Link Library works when you don’t select the option to only show one category at a time.
Thanks for looping back to this topic 🙂
I guess the simplest way is to show you some code.
When I want to use AJAX to display the link categories and the links themselves without reloading the page, here is the generated code (you can see it here):
I suggest that, instead of echoing
href="#", you echo the real URL of the page where each link list will appear. This way :
Which leads me to other problems I have with Link Library:
- You should call Link Library CSS and JS through the wp_enqueue_script and wp_enqueue_style WordPress hooks. Not only would it be cleaner and safer regarding WordPress performances, but this would allow anyone to manipulate them through functions.php files, for example. We don’t all need Link Library CSS actually. In order to disable Link Library CSS, since it is not enqueued through the aforementioned hook, you have to comment the CSS call out from link-library/link-library.php. However it means you will have to do this everytime Link Library is updated… which is not very practical. It would be much easier if we could simply remove it through wp_deregister_style.
<img />tag must be closed by the
These are a few suggestions to improve Link Library’s overall quality.
Like I said, I really enjoy this plugin, which is complete and balances WordPress poor links functionality. You really did a great job! In my opinion, some of its weak points are very easy to correct (I can help!).
I think Objective Best Practices for Plugin Development could be useful in this quest of upper quality for your plugin 🙂
- The topic ‘[Plugin: Link Library] Accessible AJAX links display’ is closed to new replies.