Plugin Author
Baden
(@baden03)
what exactly do you mean?
By a single user?
By all users in total?
What is your application?
Thread Starter
wzshop
(@wzshop)
Hi,
Thanks. Its just that i want to hide/show the contact info of different users and show the users the total amount of times that people (so for all the users togethers) clicked on their contact info (hide show dropdown).
Plugin Author
Baden
(@baden03)
this is not something the plugin does directly, but you could very easily hook up a google analytics event tracking to the expand trigger.
Would something like that work?
Thread Starter
wzshop
(@wzshop)
Hi,
Hmm i am actually looking for to update post meta when the dropdown is clicked (i only have 1 dropdown per postid). I guess the value should be passed through php to the mysql database right? Not sure where to start
Plugin Author
Baden
(@baden03)
Wow, this is certainly a more advanced application. But… it’s possible.
Actually, what you need to do is the following:
Create a jQuery listener that hooks into the expand trigger. Hint: Collapse-Pro-Matic has a built-in call back for collapse/expand events.
The callback will need to make an ajax call, sending the post_ID
The ajax function will use the post_ID and increment the meta_value by one of your counter.
That’s it, you’re done.
If you are up to the task, we’ll help guid you as much as possible, but this beyond the scope of plugin support and will require you know a little about jQuery and PHP….
Here is a good tutorial on WordPress and Ajax to get you started.
May the force be with you!