Go to bottom

Need help with Wordpress, PHP, plugin coding.

category: code [glöplog]
Heya all!
I'm working on the website for Récursion party which is a basic, standard, wordpress site.

I would like to add a sidebar with a list of the people who will be there, with the option for anyone to add their name to the list - pretty much like a oneliner.

I've done some googling and followed tutorials and coded a plugin/widget in PHP. But it seems I can't create a new table in the database for that. I've also tried just dumping everything in a plain text file. Doesn't work either.

I'm far from being a pro. Any help appreciated :D
added on the 2012-09-12 04:33:29 by BarZoule BarZoule
i did some wordpress hacking but never a plugin so i cant help you with that anymore than the their support forum where other folks are asking same things, but why dont you have twitter integration instead? there are some plugins already existing for that and it's much more 2012.

sorry i can't be more helpful :(
goodluck :)
added on the 2012-09-12 07:32:35 by psenough psenough
I've done Wordpress plugins (for internal use), what do you need?
added on the 2012-09-12 12:33:03 by Gargaj Gargaj
what do you need?

I guess I need two things mainly:
1. a pointer to the right direction, so that I don't waste more time on something that wouldn't be worth it
2. the ways to get there, in case it's one of those solutions I tried already.

More concretely, it would allow people visiting the site to add some data [their handles] to a custom database [list of people visiting the party].

Now, will it be overloaded by spam?
Would I need a non-bot check?
Maybe I should follow the submit action by a pop-up informing that it's not the actual registration process?

Just saw other answers on another front - Gargaj: I'll contact you (directly) if I'm still stuck :)
added on the 2012-09-13 06:49:32 by BarZoule BarZoule
Is switching to a different CMS not an option?

Textpattern should be much easier in terms of plugin-making, and I think there was something like that at Textpattern Resources. Or you could just poke Stef Dawson, and he might assemble it for you in a day or two.
added on the 2012-09-13 08:31:52 by MyO MyO
MyOtheHedgeFox: you'd think the last thing they want is to switch engines when they already have the site up and running ;)


buz: here's the list of essentials:

1. you create your table with a hook on register_activation_hook
2. you register your widget on widgets_init using register_widget
3. your widget is an extension of the WP_Widget class
4. use the WP_Widget::widget($args,$instance) function to actually render the content; $args["before_widget"] and $args["after_widget"] are your standard html data you must wrap it into. (i.e. echo these before and after your code
5. you can use the form($instance) function to add an options GUI
6. i personally put the handling of the incoming post data into the widget constructor so i can redirect the user before there's any output.
7. optionally, you can put a drop table in your uninstall.php

now, in broader terms:
1. spam check should be basic - anything that looks like an url or html should be discarded. this'll get rid of 90% of the crap.
2. wp has some pretty good ajax facilities, so you can utilize that too.
added on the 2012-09-13 09:01:45 by Gargaj Gargaj
Oh. Yeah. (grows a palm on his face)
added on the 2012-09-13 09:13:37 by MyO MyO


Go to top