vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Toplist Hack (https://vborg.vbsupport.ru/showthread.php?t=38076)

Warlord 11-09-2002 01:50 AM

Ok, I've made a few changes...

The members banner now leads to their site, as does the link with their site name, I got rid of the button code stuff.

I do have a question...

What code would I use to create my own (hosted on my server) button for people to put on their site which they can click and have their votes recorded?

I want to add this code to the add site and edit site features.

Warlord 11-09-2002 10:19 PM

Anybody home? :D I'm kind of dead in the water about promoting this thing until I get the code they need to put on their web page.


I need the code to put in the textarea on the add site page:

http://www.superherochat.com/forums/...php?action=add

And I also want to put it on the edit site page (in case they lose the code):

http://www.superherochat.com/forums/...hp?action=edit

Ok, I think I may have figured out the code, but how do I get it to appear on the page without becoming active? I can't put it in the textarea box, because I need the php to stay active, AND keep the html inactive....


This is the code I came up with...

PHP Code:

<a href="http://www.superherochat.com/forums/toplist.php?action=in&topid=$topid"><img src="http://www.superherochat.com/images/vote.jpg" border=0 height=142 width=113 alt="Vote for this site on the Superhero Chat Top Fansites!"></a

Any suggestions?

Warlord 11-09-2002 10:42 PM

P.S. That's only the code for the edit site feature, for after they register a site to the list.. I have no clue on how to come up with code to do it before they actually register.. it'd have to be some sort of counter (i.e. the last site to register was topid=4 so the next person to click register would get topid5, but I'm clueless as to how I would set that up on the register page)

Warlord 11-09-2002 11:20 PM

ok, I figured it out for the edit site feature.. seems php is still active in textarea tags and html isn't, so I just put it in there...

But I still don't know how to do it with the "add site feature" :(

Warlord 11-10-2002 09:12 PM

Is anyone else having problems with the Edit SIte feature? It says my info has been updated, but it doesn't actually update it. Anyone have the fix for this?

Warlord 11-10-2002 11:44 PM

Quote:

Originally posted by ManagerJosh
Here is a patch to correct the sorting issue on the toplist. This corrects the sorting issue though I'm not sure what Slynderdale had in mind.

This addresses the problem earlier stated by Slynderdale:


This patch adjusts settings in the MySQL so that it handles the sorting properly.

Be Sure to Back Up Your Database in case something happens.

Run the following MySQL query in PhpMyAdmin:
PHP Code:

ALTER TABLE `toplist_sitesCHANGE `topid` `topidINT(11UNSIGNED NOT NULL AUTO_INCREMENT

After running the MySQL Query, log out of your Database, and view your TopList. It now sorts properly. In Version 2.0, I'm not sure what changes will be made to sort it properly, but hopefully what I did is what Slynderdale had in mind.

Enjoy!


GAHHH! Now I'm having the problem with the sites being in the wrong order... I tried that sql query above and it had no effect. :(

Anyone offering any support on this thread or am I just talking to myself?

Warlord 11-11-2002 09:55 PM

bump

Warlord 11-12-2002 02:45 AM

Ok, well since nobody wanted to help me, I figured it out by myself...

To fix the sorting issue run this sql query...

PHP Code:

ALTER TABLE `toplist_sitesCHANGE `topin` `topinINT(11UNSIGNED NOT NULL AUTO_INCREMENT

ManagerJosh had it close, but had the topid instead of topin.

Warlord 11-12-2002 02:59 AM

Still need help with that edit site feature though.. if anyone wants to help me out.


Pretty Please with a cherry on top? :D

Warlord 11-12-2002 09:43 PM

Can someone at least answer this thread? I'm starting to think I've been 'secretly banned' or something.. lol..

*Climbs to tallest thread and bellows out....*

HELLO!

*echo resonates throughout the canyon*

Warlord 11-14-2002 01:30 AM

Ummm ok.. who did I piss off?

hagan 11-14-2002 04:10 PM

I have installed it now but not made it public untill yet.
First i will thank you for this great hack.It will be very usefull for any boardcommunity.

Now a few things i realize after installing it.

The editfunction does not work properly.
You click on edit and will be redirect to the editscreen.

Also, i really dont understand what this custom buttonstuff is good for.
For me a toplist on my board should have only one button.Mine, that the members can add on their sites.
Visitors on the member sites clicks on the button or banner from me and automaticly votes for the site and will be redirect to my boards toplist.

Regards Hagan

ULTIMATESSJ 11-14-2002 04:20 PM

one thing that would really improve it would be the ability for the rank number to appear on the buttons, a site commenting system for the members to comment on the sites on the toplist, and to be able to split it into different rank categories, say most unique visitors, or most button clicks on the toplist

Warlord 11-14-2002 11:06 PM

Quote:

Originally posted by hagan
I have installed it now but not made it public untill yet.
First i will thank you for this great hack.It will be very usefull for any boardcommunity.

Now a few things i realize after installing it.

The editfunction does not work properly.
You click on edit and will be redirect to the editscreen.

Also, i really dont understand what this custom buttonstuff is good for.
For me a toplist on my board should have only one button.Mine, that the members can add on their sites.
Visitors on the member sites clicks on the button or banner from me and automaticly votes for the site and will be redirect to my boards toplist.



Regards Hagan

Sounds like you want yours how I have mine set up.

Here's a demo..

http://www.superherochat.com/forums/toplist.php

If you'd like I can send you the template changes I made.
As for the edit site feature, I get the screen where you're supposed to make your changes, but the changes I make just won't take effect. Are you sure you added all the templates?

hagan 11-15-2002 05:36 AM

I get on the editscreen, make my changes and click on submit.
Then i get back to where i was, the editscreen.The Changes have like you said no effect.

I was on your toplist.Looks very good.You got rid of this custom buttonstuff.
But one thing is still missing.If you get to a membersite and click on your toplistbutton to vote you must be registered to vote.
I think everybody should be able to vote.This would create much more traffic and hits.

Warlord, that would be very nice.I would love to have your template modifications.
Or make it here public.I think there are others that want it.

Best regards,
Hagan

Warlord 11-16-2002 01:47 AM

ManagerJosh has his list set up so non-members can vote, perhaps he would be so kind as to enlighten the rest of us as to how we might make the same changes? :D

Also, has anyone figured out how to fix the Edit option? ManagerJosh thinks it's a php problem and not a mysql problem.. anyone got a fix for this yet?



Here's the template modifications I made for anyone that wants them....

Warlord 11-18-2002 12:14 AM

bumpity doo daa

Warlord 11-18-2002 12:44 AM

Ok people.. once again... here's the fix.. this time for the updating problem we were having for the edit site feature.

Just overwrite your current toplist.php with this one.

As always, make a backup of the file you are about to overwrite.. "Just in case".

Automated 11-22-2002 05:02 PM

How do you access the admin bit of the script?

Thanks
Matthew

Warlord 11-23-2002 08:27 PM

If you're referring to the administrative features, you can edit/delete sites by clicking "Edit" beneath their site listing.

!!! 11-24-2002 10:23 PM

Interesting, the names "Cheetos," "Loriel," and "Godspeed" reminded me of Graal ;)

https://vborg.vbsupport.ru/attachmen...&postid=246096

Shadow Kni...I mean, Slynderdale (if that's your real name!), do you have a website?

Slynderdale 11-25-2002 11:28 PM

Good News, one, i have no need of a web host any more, i installed php, apache and mysql on my laptop so now i can work on my scripts esily, and i also have access to my vbulletin account again, for some reason it was telling me i had the wrong password and wouldnt let me log in for a couple weeks then i went to the password recovery form, i got the confirmation email and i confirmed and it never sent the new email with the new pass, i got it now, i also will be working on more hacks and upgrades to these, i also will be releasing all my hacks that i have made such as the profile add ons and picture hack and so forth.

Slynderdale 11-25-2002 11:31 PM

Quote:

Originally posted by !!!
Interesting, the names "Cheetos," "Loriel," and "Godspeed" reminded me of Graal ;)

https://vborg.vbsupport.ru/attachmen...&postid=246096

Shadow Kni...I mean, Slynderdale (if that's your real name!), do you have a website?

My real name is John, my handle is Slynderdale and yes im the same Shadow Knigt that useto play and code for graal, i havnt been on there in months and i dont even have it on my computer any more, i lost interest into it, coding for it was fun, but it held no future for me.

Slynderdale 11-25-2002 11:34 PM

Also also, im totaly recoding the toplist hack from scratch, im also fixing the html coding up, im adding alot of fixes and features to it, and also it will have settings like allowing non members to vote and alot of others like having a setting allowing only the top 10 sites to be able to show the banners. If you have any requests please feel free to post them.

UnForums2k 11-28-2002 02:48 AM

is there anyway to move the toplist hack to the main directory instead of under vbulletin? but still keep all the same options like user must be registed?? this would be really useful and i personaly like this hack more than Dj ..blahs... more simple and no images to slow forum down... nice work

GoTTi 01-06-2003 01:22 AM

On the top links added, I want it when a user clicks on the banner they get a new IE window pointing to that address, not a Add URL field for their site.

How do I edit this to do that? That is how a Top List hack should work? CLick that banner and goto site.

GoTTi 01-12-2003 09:06 PM

how can we integrate flash banners and buttons in this hack?

I tried to do it, and I get a image error.

lifesourcerec 01-15-2003 06:04 PM

I moved everything over to a new site, and now I get this error:

Invalid SQL: SELECT inid FROM toplist_hitsin WHERE topid='16' AND ipaddress='24.201.40.192' AND date='20030115'
mysql error: Unknown column 'ipaddress' in 'where clause'

How do I insert a new column in phpMyAdmin?

GoTTi 01-16-2003 08:56 PM

does ne1 know howto integrate flash banners into this hack?

i did it and got a error image.

lifesourcerec 01-17-2003 06:14 AM

Quote:

Originally posted by lifesourcerec
I moved everything over to a new site, and now I get this error:

Invalid SQL: SELECT inid FROM toplist_hitsin WHERE topid='16' AND ipaddress='24.201.40.192' AND date='20030115'
mysql error: Unknown column 'ipaddress' in 'where clause'

How do I insert a new column in phpMyAdmin?

Nevermind. Figured it out :)

GoTTi 01-23-2003 11:11 PM

I would like to integrate Flash banners and buttons into this hack...how can I go about doing this?

GoTTi 01-25-2003 11:41 PM

Great hack here, but now adays sites have FLASH...AND THIS HACK isn't compatible with FLASH...

how can it be integrated with FLASH banners and buttons????????

GoTTi 02-20-2003 12:58 AM

integrate FLASH into this hack, how can i do it?

insanctus 02-27-2003 04:50 AM

I like this hack but there is one major thing I do not like.

The person has to be a memeber to vote.

To be a member to add a site makes sence. But how many are going to click vote then sign up for a page.

Lets face it most do not take the time. Sure that is where ones site content helps. But just getting going could prove hard.

Any ideas?

insanctus 03-02-2003 06:26 PM

N/M Hacked it to check ip instead of names.

Very cool script..

mikeB 03-05-2003 11:23 PM

Quote:

Originally posted by insanctus
N/M Hacked it to check ip instead of names.

Very cool script..

how?

insanctus 03-06-2003 08:29 AM

I added a table in mysql called iplog

Then in toplist.php I changed the part under ######In#### to.

PHP Code:

// ####### In #######
if  ($action=="in") {
if (
$topid=="") {
$goto="toplist.php?s=$session[sessionhash]";
eval(
"standardredirect(\"".gettemplate("toplist_error_blankid")."\",\"$goto\");");
exit;
}
$iplog $REMOTE_ADDR;
$result=$DB_site->query("SELECT inid FROM toplist_hitsin WHERE topid='$topid' AND date='$today' AND iplog='$REMOTE_ADDR'");
list(
$voted) = mysql_fetch_row($result);
if (
$voted == ''){
$DB_site->query("INSERT INTO toplist_hitsin (topid, accountid, date, iplog ) VALUES ('$topid','$accountid','$today' ,'$REMOTE_ADDR')");
$DB_site->query("UPDATE toplist_sites SET topin=topin+1, todaytopin=todaytopin+1 WHERE topid='$topid'");
}
doshutdown();
header("location: toplist.php?s=$session[sessionhash]");


Now if they are not a memeber they can vote in.... not out.... but if you wanted to do that I am sure it be easy to add.

Mine now only checks ip's per day. Hope that helps :)

mikeB 03-06-2003 09:57 AM

this is very helpful!> I'm not all that familiar w/ mysql.. can you tel me how you added the table iplog? did you have to run a specific query?

thanks a ton>!

insanctus 03-06-2003 10:08 AM

Ok .. In phpadmin in your forum data base find this "toplist_hitsin"

Now click it then click browse.

You will see things link inid , topid, date.

Now scroll down and find. Add new field 1 at end of table. Hit go.

In Field put iplog then hit save... and your done :)

mikeB 03-06-2003 10:24 AM

http://www.cloud10.org/gallery/data/500/1mysqlerror.jpg

ok when I try to add new field 1 at end of table, I go to whats displayed in the above image

then when I try and add iplog I get this error:
http://www.cloud10.org/gallery/data/...ysqlerror1.jpg

is there something else I need to add to make it happen?


All times are GMT. The time now is 05:55 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01324 seconds
  • Memory Usage 1,840KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete