Hey all! I have recently created a module that displays any particular SMF's poll and allow users to vote using it. It is my first foray into the world of AJAX, so suggestions are definitely welcomed!
The module will take any poll settings from SMF and properly reflect them. Language translation is also supported. It also requires SMF and JSMF2.0 to be installed first, and was especially made for JSMF users
Didn't have an account so when I registered I was taken to a page with this informational message.
Code:
Your account has been created and activation link has been sent to the e-mail address you entered. Note that you must activate the account by clicking on the activation link when you get the e-mail before you can login.
On this page your poll was shown on the right sidebar, and it had these errors:
p9939068 Ajax SMF Poll
Code:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 322
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 323
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 325
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 326
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 327
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 322
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 323
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 332
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 333
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 340
hmmm... and then clicking my registration link I get this error:
Code:
There is no such account in our database or the account has already been activated.
So I tried to login via Joomla-SMF Login(hey that looks familiar ) and it worked. Then I placed my vote, very well done Mike! I like the way the items you voted for are in bold. And the ability to remove vote is nice. How are you doing the AJAX, using a framework or all by hand? I have used xajax a lot recently but their rate of development has been slow so I am searching out better alternatives. Or I might wait for incorporation of JSON into the core php.
Didn't have an account so when I registered I was taken to a page with this informational message.
Code:
Your account has been created and activation link has been sent to the e-mail address you entered. Note that you must activate the account by clicking on the activation link when you get the e-mail before you can login.
On this page your poll was shown on the right sidebar, and it had these errors:
p9939068 Ajax SMF Poll
Code:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 322
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 323
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 325
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 326
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 327
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 322
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 323
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 332
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 333
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/sbadmin/public_html/mike/modules/mod_smf_ajax_polls.php on line 340
hmmm... and then clicking my registration link I get this error:
Code:
There is no such account in our database or the account has already been activated.
So I tried to login via Joomla-SMF Login(hey that looks familiar ) and it worked. Then I placed my vote, very well done Mike! I like the way the items you voted for are in bold. And the ability to remove vote is nice. How are you doing the AJAX, using a framework or all by hand? I have used xajax a lot recently but their rate of development has been slow so I am searching out better alternatives. Or I might wait for incorporation of JSON into the core php.
Sure you don't want to be part of the dev team!?
Fixed the warning messages. It appears that i can't re-use form fields even though they're on other forms (in this case "task") with ajax
I'm doing this all by hand. Didn't want to use a framework cus 1) doing it manually allows me to learn from scratch, 2) there is actually no "x" in my ajax script , and 3) my ajax script handles only 1 single form and outputs into 1 single div, so a framework will be kinda overkill.
I'm taking a break from work (as promised to my gf ), and my other (non-web) projects are already a handful, so i really doubt i'll have any time left
Rgds, Mike
Logged
----- Owner of http://mike.simbunch.com Creator of ParaInvite, AJAX Sandbox, AJAX SMF Polls, Profile URL etc..
Great module! I was serching for it long time. Thank you!
Little notice. Joomla and SMF on my site are using UTF-8 encoding. But your module have hardcoded ISO-encoding. To get entire encoding from SMF will be more convenient in this case, I think.
Great module! I was serching for it long time. Thank you!
Little notice. Joomla and SMF on my site are using UTF-8 encoding. But your module have hardcoded ISO-encoding. To get entire encoding from SMF will be more convenient in this case, I think.
Unfortunately i cant do that cos it's a joomla module afterall. i tried utf_encode it, but all i get is a '?'.
Nonetheless I've attached a copy with UTF "enabled". Please do me a favor and test it if it works. None of my sites are UTF configured, so I can't really test it. This version only converts the poll options to utf. Thanks.
What do you mean it works only after you changed to 1.0.3..?
Sorry i forgot to change that line. i've overwritten the previous post with the updated version, though i still very doubt it'll work. Appreciate it if someone can point me in the right direction
Logged
----- Owner of http://mike.simbunch.com Creator of ParaInvite, AJAX Sandbox, AJAX SMF Polls, Profile URL etc..
I mean that 1.0.3 works perfectly with UTF-8 after the ony one line changing and it is not necessary (I think) to improve hereafter.
I see. Can you please do me a favor and upgrade to the version i uploaded on the previous post, then set it to UTF-8 in the module's config, and see if it works? Much appreciated, thanks!
Logged
----- Owner of http://mike.simbunch.com Creator of ParaInvite, AJAX Sandbox, AJAX SMF Polls, Profile URL etc..
Hi folks, I've just made an AJAX based joomla module that displays a user's cb connections. Works great for users who've integrated Joomla with SMF and CB.
I see. Can you please do me a favor and upgrade to the version i uploaded on the previous post, then set it to UTF-8 in the module's config, and see if it works? Much appreciated, thanks!
No, it doesn't. Neither with "iso" nor with "utf" setting.
Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use