Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Accordion widget for wordpress
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
dayaparan ponnambalam  
View profile  
 More options Nov 13 2007, 12:47 pm
From: "dayaparan ponnambalam" <d...@meyshan.com>
Date: Tue, 13 Nov 2007 23:17:17 +0530
Local: Tues, Nov 13 2007 12:47 pm
Subject: [wp-hackers] Accordion widget for wordpress
Please comment on my new wordpress widget, that uses jquery accordion to
enhance wordpress blog sidebar with tabbed browsing to inbuild upto 6
plugins. You can see more details and the demo
here<http://www.spicyexpress.net/general/accordion-the-new-wordpress-ajax-...>

--
Dayaparan
Executive Director
NHIT
Trichy
India
*Mobile:* 919965370000
d...@19hourit.com
http://www.19hourit.com
_______________________________________________
wp-hackers mailing list
wp-hack...@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ozh  
View profile  
 More options Nov 13 2007, 2:59 pm
From: Ozh <o...@planetozh.com>
Date: Tue, 13 Nov 2007 20:59:15 +0100
Local: Tues, Nov 13 2007 2:59 pm
Subject: Re: [wp-hackers] Accordion widget for wordpress
On Nov 13, 2007 6:47 PM, dayaparan ponnambalam <d...@meyshan.com> wrote:

> Please comment on my new wordpress widget, that uses jquery accordion to
> enhance wordpress blog sidebar with tabbed browsing to inbuild upto 6
> plugins. You can see more details and the demo
> here<http://www.spicyexpress.net/general/accordion-the-new-wordpress-ajax-...>

My 2 cents, in no particular order, as I read your plugin source
(didn't try it). Consider that each of the following points starts
with "in my humble opinion" :)

- function widget_accordion_init() seems mostly useless: $option is
always undefined, so adding option then immediately getting option is
pointless

- $here in function accordion_head() is hardcoded, which is bad: if a
user renames the directory, the plugin breaks. Let the plugin guess
its own directory using plugin_basename() or something similar

- jquery is bundled with most WP version, so it's a waste of bandwidth
to include your own. Also, it's better to use wp_enqueue_script() to
add a javascript. This way you make sure it's loaded once. This is a
nice wrap up for this:
<http://nickohrn.com/loading-javascript-libraries-in-wordpress-plugins...>

- it's always a good habit to make good use of nonces &
attribute_escape() when playing with POST stuff. Nice tutorial about
this: <http://blogsecurity.net/wordpress/articles/article-280507/>

- const NUM_PLUGINS look like a candidate for a widget option, why hardcode it ?

- you're using jquery, but you're javascript is plain old stuff.
document.getElementById("accordion-" + n) instead of
jQuery('#accordion-'+n) or el.style.display = "block" instead of
jQuery(this).show(), etc... You can make your javascript shorter and
cuter.

- the plugin could also be less intrusive and more nicely degradable
(when doing stuff with JS, think "how things are going to look like
with JS disabled, or when the page is printed")
For instance, instead of :
<a href="#" onclick="dostuff()">
which is confusing with JS disabled, you can preferably do:
<span id="dostuff">
and:
jQuery('#dostuff').click(function(){dostuff();});
which is much less intrusive since it degrades to correct html with no JS.
It would make sense to me that when there is no JS, the 3 tab contents
from your accordion are displayed, or the 2 tabs with hidden content
are hidden too (it makes no sense to have an empty link on "Comment"
that does nothing when clicked)

</my 2 cents>

Cheers

Ozh

--
http://FrenchFragFactory.net ~ Daily Quake News
http://planetOzh.com ~ Blog and WordPress Stuff
_______________________________________________
wp-hackers mailing list
wp-hack...@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »