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)
-   -   Vote my Site (https://vborg.vbsupport.ru/showthread.php?t=46662)

flup 12-13-2002 10:00 PM

Vote my Site
 
This hack will add a little piece of PHP Script in your index.php file.
This is the only file to edit and only 1 change is needed.

The result will look like:
o1 o2 o3 o4 o5 o6 o7 o8 o9 o10

o = click point to vote
1 -> 10 are the votenumbers

**************************************************

Latest Version:
1.01

Updates:
***** Vote has been centered on top of page.

Chris M 12-14-2002 11:03 AM

Sounds good:)

Satan

flup 12-14-2002 11:08 AM

Yub, are bussy with design now

Graphics 12-14-2002 11:28 AM

I've not installed it yet. But it seems like what I might be looking for. However, could you make it so that it works with images?

You'd have your vote my site. But then after you'd voted it would show you a big number 9 image or summin like that. Not sure if this is already implemented. :p

flup 12-14-2002 11:31 AM

I will see.

flup 12-14-2002 11:32 AM

Update

Delete excisting Vote Site Code and replace with

Quote:

<table width="100%" border="0">
<tr>
<td align="center">
$DataBestand = "score.php";
$Hoeveel = 10;
$Afronden = 2;
/* <?php include("rating.php"); ?> */
$Stand = file($DataBestand);
$IPadressen = explode("|",trim($Stand[1]));
$Stemmen = explode("|",trim($Stand[2]));

if(isset($stem) && intval($stem) <= $Hoeveel && intval($stem) > 0 && !in_array($REMOTE_ADDR,$IPadressen)) {
$Stemmen[] = $stem;
$IPadressen[] = $REMOTE_ADDR;
$SchrijfBestand = fopen($DataBestand,"w");
fputs($SchrijfBestand,"<?php exit; ?>\n");
fputs($SchrijfBestand,implode("|",$IPadressen)."\n ");
fputs($SchrijfBestand,implode("|",$Stemmen));
fclose($SchrijfBestand);
$Stand = file($DataBestand);
$IPadressen = explode("|",trim($Stand[1]));
$Stemmen = explode("|",trim($Stand[2]));
}
echo("<form style='margin: 0px' method=post action=''>\n");
if(in_array($REMOTE_ADDR,$IPadressen)) {
echo("Average: ".round((array_sum($Stemmen)/(count($Stemmen)-1)),$Afronden));
}
else { for($i = 1; $i <= $Hoeveel; $i++) { echo("<input name=stem value='$i' type=radio onclick='this.form.submit()'> $i "); } }
echo("</form>");
</td>
</tr>
</table>

NOTICE: code has to be places IN TOP OF INDEX.PHP

flup 12-14-2002 11:37 AM

(in 1st post was v1.0)
[size=huge]
Download version 1.01
[/size]
DONT FORGET TO HIT INSTALL: INSTALL HERE
Runnin Demo on Top

flup 12-14-2002 11:54 AM

Quote:

Originally posted by Graphics
I've not installed it yet. But it seems like what I might be looking for. However, could you make it so that it works with images?

You'd have your vote my site. But then after you'd voted it would show you a big number 9 image or summin like that. Not sure if this is already implemented. :p

Don't think i can do this.
Cause $hoeveel (translated $howmuch) says how many numbers to rate (could be till 1000).
So when i want to add pictures in it, i would need to change the whole code. Maybe some1 else wants to change my code (with credtis)

Graphics 12-14-2002 01:22 PM

All I would want is a vote from 1-10.

flup 12-14-2002 01:24 PM

Vote from 1-10 is basic in this hack.

time4akshun 12-15-2002 04:31 PM

Do you have a mockup as to what this looks like live? URL?

flup 12-15-2002 04:42 PM

ofcourz

flup 12-15-2002 04:49 PM

Here it is.
Made it simple with HTML, but this is how it looks like exact.

Automated 12-15-2002 09:01 PM

nice lil hack but quite pointelss really :p

flup 12-16-2002 01:50 PM

Could be usefull for someone who is looking for it.


All times are GMT. The time now is 02:23 AM.

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.01097 seconds
  • Memory Usage 1,742KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (15)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete