Anonymous voting bug

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 10-15-2006, 02:50 AM
Casual Pligger
 
Join Date: May 2006
Posts: 43
I've noticed recently that anonymous voting doesn't work if no CNAME is included in the domain. For example, if I go to my site through this url:

http://nebulocity.net

and try to vote anonymously, I get no response when clicking on the "vote" link. However, if I reference my site through this URL:

http://www.nebulocity.net

anonymous voting then works fine. Anyone know how to get around this?
Reply With Quote
  #2 (permalink)  
Old 10-15-2006, 02:23 PM
savant's Avatar
Constant Pligger
 
Join Date: Apr 2006
Location: UK
Posts: 1,181
You have set you base_url as
http://www.nebulocity.net right?

when accessing it from http://nebulocity.net
Firfox think it's trying ajax to a remote site which it stops.

Will look for a solution
Reply With Quote
  #3 (permalink)  
Old 10-16-2006, 02:05 AM
Casual Pligger
 
Join Date: May 2006
Posts: 43
Quote:
Originally Posted by savant View Post
You have set you base_url as
http://www.nebulocity.net right?
That is correct.

Thanks for looking into this
Reply With Quote
  #4 (permalink)  
Old 10-16-2006, 02:44 AM
savant's Avatar
Constant Pligger
 
Join Date: Apr 2006
Location: UK
Posts: 1,181
add this bit

PHP Code:
   try {
    
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
   } catch (
e) {
    
alert("Permission UniversalBrowserRead denied.");
   } 
before every new myXMLHttpRequest ();

please try this and see if it works and post your results.

btw very nice site.
Reply With Quote
  #5 (permalink)  
Old 10-16-2006, 10:57 AM
Casual Pligger
 
Join Date: May 2006
Posts: 43
I added this to my /js/xmlhttp.js file, but still no luck. Is their a different file you wanted me add this to?
Reply With Quote
  #6 (permalink)  
Old 10-16-2006, 11:19 AM
savant's Avatar
Constant Pligger
 
Join Date: Apr 2006
Location: UK
Posts: 1,181
in xmlhttp.php please.
Reply With Quote
  #7 (permalink)  
Old 10-16-2006, 11:21 AM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Social Pro Kit
 
Join Date: Jun 2006
Posts: 5,448
This can be fixed with a proper .htaccess file

Code:
##### Re-directing Begin #####
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.mydomain.com/ [R=301,L]
RewriteCond %{HTTP_HOST} ^www.mydomain\.com$ [NC]
RewriteRule ^(.*)$ http://mydomain.com/$1 [R=301,L]
##### Re-directing End #####
this will force anyone going to www mydomain.com and make all urls drop the www

you would obviously change the mydomain to your own.
Reply With Quote
  #8 (permalink)  
Old 10-16-2006, 12:02 PM
Casual Pligger
 
Join Date: May 2006
Posts: 43
Chuckroast,

Thanks for the suggestion. I added a .htaccess file to my root directory with the following (since removed because it wasn't working):

Code:
##### Re-directing Begin #####
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.nebulocity.net/ [R=301,L]
RewriteCond %{HTTP_HOST} ^www.nebulocity\.net$ [NC]
RewriteRule ^(.*)$ http://nebulocity.net/$1 [R=301,L]
##### Re-directing End #####
It is still not working though. In fact, after adding it, it caused a new window to open every time I clicked to go to a new section on my site. Is this .htaccess file allowing you to vote anonymously on one of your pligg sites? I'd be interested in seeing a live example if you have one.

Thanks!
Reply With Quote
  #9 (permalink)  
Old 10-16-2006, 12:09 PM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Social Pro Kit
 
Join Date: Jun 2006
Posts: 5,448
Hi konakevin

Yeah, I have anon-voting available on http://scooptube.com

I'm using that same code in my .htaccess file and it seems to work fine for me.. I can post my entire .htaccess file if you would like to try that.. just change the domains to yours.. Hope that helps

Code:
##### Re-directing Begin #####
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.scooptube.com/ [R=301,L]
RewriteCond %{HTTP_HOST} ^www.scooptube\.com$ [NC]
RewriteRule ^(.*)$ http://scooptube.com/$1 [R=301,L]
##### Re-directing End #####

##### Friendly URLs Begin #####
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteRule ^story/([0-9]+)/?$ story.php?id=$1 [L]
RewriteRule ^story/([a-zA-Z0-9-]+)/?$ story.php?title=$1 [L]
RewriteRule ^category/([a-zA-Z0-9]+)/?$ ?category=$1 [L]
RewriteRule ^category/queued/([a-zA-Z0-9]+)/?$ shakeit.php?category=$1 [L]
RewriteRule ^shakeit/([a-zA-Z0-9]+)/?$ shakeit.php?category=$1 [L]
RewriteRule ^story/([0-9]+)/editcomment/([0-9]+)?$ edit.php?id=$1&commentid=$2
RewriteRule ^story/([0-9]+)/edit/?$ editlink.php?id=$1
RewriteRule ^story/([0-9]+)/modify/([a-z]+)/?$ linkadmin.php?id=$1&action=$2
RewriteRule ^user/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?$ user.php?login=$1&view=$2
RewriteRule ^user/([a-zA-Z0-9-]+)/?$ user.php?login=$1
RewriteRule ^search/([a-zA-Z0-9-]+)/?$ index.php?search=$1
RewriteRule ^login/?$ login.php
RewriteRule ^login/([a-zA-Z0-9-]+)/?$ login.php?return=$1
RewriteRule ^login/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?$ login.php?return=$1/$2
RewriteRule ^register/?$ register.php
RewriteRule ^user/?$ user.php
RewriteRule ^topusers/?$ topusers.php
RewriteRule ^topstories/?$ topstories.php
RewriteRule ^about/([a-zA-Z0-9-]+)/?$ faq-$1.php
RewriteRule ^shakeit/?$ shakeit.php
RewriteRule ^submit/?$ submit.php
RewriteRule ^bugreport/?$ bugreport.php
RewriteRule ^rss2/?$ rss2.php
RewriteRule ^rss2/([a-zA-Z0-9-]+)/?$ rss2.php?status=$1
RewriteRule ^trackback/([0-9]+)/?$ trackback.php?id=$1
RewriteRule ^profile/?$ profile.php
RewriteRule ^admin/?$ admin_index.php
RewriteRule ^tagcloud/?$ cloud.php
RewriteRule ^sneak/?$ sneak.php
RewriteRule ^pliggadmin/?$ admin_index.php
RewriteRule ^logout/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?$ login.php?op=logout&return=$1/$2
##### Friendly URLs End #####
Reply With Quote
  #10 (permalink)  
Old 10-16-2006, 03:30 PM
Casual Pligger
 
Join Date: May 2006
Posts: 43
Okay, I changed the .htaccess file to do the opposite of yours so that it forces all requests to www.nebulocity.net:

Code:
##### Re-directing Begin #####
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://nebulocity.net/ [R=301,L]
RewriteCond %{HTTP_HOST} ^nebulocity\.net$ [NC]
RewriteRule ^(.*)$ http://www.nebulocity.net/$1 [R=301,L]
##### Re-directing End #####
And this has fixed my problem. Thanks for all the help!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Anonymous voting bond Questions and Comments 24 12-21-2008 11:10 PM
Anonymous Voting?? Hershey Questions and Comments 4 05-02-2007 10:39 AM
Need help with Anonymous voting. Cazem Questions and Comments 15 02-27-2007 05:22 PM
anonymous voting iisbum Questions and Comments 12 06-25-2006 09:51 AM
Anonymous voting bug? How to fix. can8dn Questions and Comments 2 06-03-2006 02:59 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development