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)
-   -   vbHome (lite) - your vBulletin(powered) main homepage (https://vborg.vbsupport.ru/showthread.php?t=36756)

212rikanmofo 04-22-2002 08:33 AM

how can i add that scrolling top 10 thread list like on one of the guy's site on here? can you show me please...

FleaBag 04-24-2002 04:02 PM

Quote:

Originally posted by 212rikanmofo
i just wanna know is it possible to rename my current index.php to index.bak b4 i install this hack? just incase i want to revert back? is there an uninstall feature for this hack?
Yes it is, I did so myself.

FleaBag 04-24-2002 04:04 PM

Quote:

Originally posted by Emma
another question, I wasn't sure if this was the place to post it since it involves another hack too, but it I am in the wrong place forgive me :)

My question is I have a shoutbox already installed on my site. But I wanted to move it into a small table on a page where I have vbhome installed. How do I do this? I wasn't sure what part of the code needs to be copied over into the index file and so forth.

Thanks!
Emma

You could use iframes, there is more information on this in the actual shoutbox thread.

212rikanmofo 04-26-2002 08:09 PM

is there a poll addon i can put on my main page for this hack please? and also will i be able to set a certain image for each post i make? kind of on like those nuke portals you can assign images to like certain topics? can i do it with vbhome?, i would like to add like whose currently online, top 10 posters, member of the day, welcome panel, statistics panel and a login panel to my vbhome, how can i do this, i am having very much problems and confused, my english isn't very good... :( please help

TECK 04-27-2002 12:06 AM

woolF[RM] managed to do it.. the poll. let's see if he can share with anyone else.. ;)
you could pm him to post a reply here on this thread.

wooolF[RM] 04-27-2002 02:53 AM

]the poll? I got it from vb index or whatever it's called with permission of the author (element). it's very easy to implement it into vbHome :)

btw, specially for nakkid :) (see attached)

TECK 04-27-2002 03:00 AM

nice results. thanks woolf. ;)
can you post a tutorial on how to add the poll to vbHome? is pulled from the forums.

wooolF[RM] 04-27-2002 03:05 AM

here's how it looks like when it'a a new poll that u have not voted for...

TECK 04-27-2002 03:08 AM

stop showing off and make those people happy... :)

wooolF[RM] 04-27-2002 03:33 AM

]
Quote:

Originally posted by nakkid
nice results. thanks woolf. ;)
can you post a tutorial on how to add the poll to vbHome? is pulled from the forums.

sure...

1) make a new template called home_poll
PHP Code:

<form action="$bburl/poll.php" method="get">
    <
input type="hidden" name="s" value="$session[sessionhash]">
    <
input type="hidden" name="action" value="pollvote">
    <
input type="hidden" name="pollid" value="$pollinfo[pollid]">
    <
table cellpadding="0" cellspacing="0" border="0"  width="95%" align="center"><tr><td>
    <
table cellpadding="4" cellspacing="1" border="0"  width="100%">
    <
tr>
    <
td bgcolor="#13486D" align="center" colspan="4"><smallfont><b>$pollinfo[question]</b></smallfont></td>
    </
tr>
    
$pollbits
    
</table>
    </
td></tr></table>
    <
table cellpadding="2" cellspacing="0" border="0" width="100%"  align="center">
    <
tr>
    <
td style="font-size: 8pt" align=center><smallfont><br><input type="submit" class="bginput" value="Vote!" style="font-size: 8pt"><br><br>
    <
a href="$bburl/poll.php?s=$session[sessionhash]&action=showresults&pollid=$pollinfo[pollid]">Result</a>
    </
smallfont></td></tr>
    </
table>
    </
form

2) make a new template called home_pollresult
PHP Code:

<table cellpadding="0" cellspacing="0" border="0"  align="center"><tr><td>
    <
table cellpadding="4" cellspacing="1" border="0"  width="100%">
    <
tr>
    <
td colspan="3" bgcolor="#13486D" align="center"><smallfont><b>
    
$pollinfo[question]</b></smallfont><br>
    <
smallfont>$pollstatus</smallfont></td>
    </
tr>
    
$pollbits
    
<tr>
    <
td bgcolor="#0A293E" align="right" ><smallfont color ="#EEEEFF"><b>Votes:</b></smallfont></td>
    <
td bgcolor="#0A293E" align="center"><smallfont color ="#EEEEFF" ><b>$pollinfo[numbervotes]</b></smallfont></td>
    <
td bgcolor="#0A293E" align="center"><smallfont color ="#EEEEFF"><b>100%</b></smallfont></td>
    </
tr>
    <
tr><td colspan=3 bgcolor="#13486D" align=center><smallfont><a href="$bburl/showthread.php?s=$session[sessionhash]&threadid=$pollinfo[threadid]">Comments <b>$pollreplies</b></a></smallfont><br>
    <
a href="$bburl/forumdisplay.php?s=$session[sessionhash]&forumid=$pollsforum"><smallfont>More Polls</smallfont></a></td></tr></table></td></tr>
    </
table

2) edit your vbhome's index.php

2a. right under
PHP Code:

// news forum
$newsforum="47"

add
PHP Code:

// polls forum
$pollsforum="48"

psssttt... remember to change forum ids! ;)

2b. right in the end of the file before
PHP Code:

eval("dooutput(\"".gettemplate('home')."\");"); 

add this:
PHP Code:

// poll
// -------------------------
$pollinfo=$DB_site->query_first("SELECT *,thread.open FROM poll LEFT JOIN thread ON (thread.pollid = poll.pollid) WHERE thread.forumid='$pollsforum' ORDER BY poll.dateline DESC LIMIT 1");

if (!empty(
$pollinfo[question])){
  
$pollinfo[question]=bbcodeparse($pollinfo[question],$pollsforum,1);

  
$splitoptions=explode("|||"$pollinfo[options]);
  
$splitvotes=explode("|||",$pollinfo[votes]);

  
$pollisclosed=0;
  
$pollisactive=$pollinfo[poll.active];
  
$pollid=$pollinfo[poll.pollid];

  
$pollreplycount=$pollinfo[replycount];
  if (
$pollreplycount == "0") {
  
$pollreplies "";
  }
  elseif (
$pollreplycount == "1") {
  
$pollreplies " (1)";
  }
  else {
  
$pollreplies " ($pollreplycount)";
  }
 if (!
$pollinfo[active] or !$pollinfo[open] or ($pollinfo[dateline]+($pollinfo[timeout]*86400)<time() and $pollinfo[timeout]!=0)){
    
//thread/poll is closed, ie show results no matter what
    
$pollisclosed=1;
    } else {
    
//get userid, check if user already voted
    
if ($uservote=$DB_site->query_first("SELECT pollvoteid FROM pollvote WHERE userid='$bbuserinfo[userid]' AND pollid=$pollinfo[pollid]")) {
      
$uservoted=1;
    }
  }
  
$counter=0;
  while (
$counter++<$pollinfo[numberoptions]) {
    
$pollinfo[numbervotes]+=$splitvotes[$counter-1];
  }
  
$counter=0;
  
$pollbits="";
while (
$counter++<$pollinfo[numberoptions]) {
    
$option[question] = bbcodeparse($splitoptions[$counter-1],$pollsforum,1);
    
$option[votes] = $splitvotes[$counter-1];  //get the vote count for the option
    
$option[number] = $counter;  //number of the option

   // Now we check if the user has voted or not

  
if ($pollisclosed or $uservoted) { // user did vote or poll is closed
      
if ($option[votes] == 0){
          
$option[percent]=0;
      } else{
          
$option[percent] = number_format($option[votes]/$pollinfo[numbervotes]*100,2);
      }
      
$option[graphicnumber]=$option[number]%1;
      
// $option[barnumber] = round($option[percent])*2;
      
$option[barnumber] = round($option[percent]);
      
$option[percent] = round($option[percent]);
      if (
$pollisclosed) {
          
$pollstatus "Poll closed.";
      } elseif (
$uservoted) {
          
$pollstatus "You have already voted.";
      }

      
$pollbits .= "<tr><td bgcolor=\"#1C5780\" align=\"left\"><smallfont>$option[question]</smallfont></td>    <td bgcolor=\"#1C5780\" width=\"20\" align=\"left\"><smallfont>$option[votes]</smallfont></td><td bgcolor=\"#1C5780\" align=\"left\" width=\"30\"><smallfont>$option[percent]%</smallfont></td></tr>";
  } else {
     
//  $pollbits .= "<tr><td bgcolor=\"#1C5780\" width=\"5%\"><input type=\"radio\" name=\"optionnumber\" value=\"$option[number]\"></td><td bgcolor=\"#1C5780\" colspan=\"3\"><smallfont>$option[question]</smallfont></td></tr>";

    
if ($pollinfo['multiple']) {
       
$pollbits .= "<tr><td bgcolor=\"#1C5780\" width=\"5%\" onMouseOver=\"this.style.backgroundColor='#13486D'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#1C5780';\"><input type=\"checkbox\" name=\"optionnumber[$option[number]]\" value=\"yes\"></td><td bgcolor=\"#1C5780\" colspan=\"3\"><smallfont>$option[question]</smallfont></td></tr>";
    }else{
       
$pollbits .= "<tr><td bgcolor=\"#1C5780\" width=\"5%\" onMouseOver=\"this.style.backgroundColor='#13486D'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#1C5780';\"><input type=\"radio\" name=\"optionnumber\" value=\"$option[number]\"></td><td bgcolor=\"#1C5780\" colspan=\"3\"><smallfont>$option[question]</smallfont></td></tr>";
    }

  }
}
  if (
$pollisclosed or $uservoted) {
    eval(
"\$poll = \"".gettemplate('home_pollresult')."\";");

  } else {
    eval(
"\$poll = \"".gettemplate('home_poll')."\";");
  }
} else {
  
$poll="No poll available.";
}
//poll finished/////////////////////////////////////////////////////////////////////////// 

4) edit your home template. Add there $poll everywhere u wish
5) Make a new poll in your vbhome poll forum (by the way, be sure to edit group permissions for it, so only admins or trusted group can make new polls)
6) Enjoy :bunny: :D

PS:

212rikanmofo 04-27-2002 05:43 AM

wool thanks a lot!!! now can you post up the rest of the code on how to add other stuff? like a login window, shoutbox, etc?
thanks!
looks really good!

212rikanmofo 04-27-2002 05:53 AM

someone help me add a welcome panel, statistics panel, whose currently online panel and a login/logoff panel please... im having much problems, all kinds of parse errors, im really confused. :(

wooolF[RM] 04-27-2002 07:58 AM

]Hey 212rikanmofo, I wont do it as it's illegal (go read rules once more) and I wont PM it as I don't think it's as a good solution. U have to work on it yourself.
Have a nice day and I hope u are a real "mofo" to do this job! :p

AussieSat 04-27-2002 08:31 AM

Hi,
Great hack, thanks. All works well, but only when logged in.....
We have a closed board - it cant be seen unless you are a member and logged in.
If a logged out member calls up the vBhome page they are presented with the login screen, when this is submitted a 404 error page is shown for member.php in the same directory as vbhome - if I place a copy of member.php in the vBhome directory the user is then presented with a blank page.
How do I set up index.php so they can login from the vBhome directory? Sorry if I have missed something obvious in either the instructions or the previous 15 pages ......

212rikanmofo 04-27-2002 08:34 AM

Quote:

Originally posted by wooolF[RM]
Hey 212rikanmofo, I wont do it as it's illegal (go read rules once more) and I wont PM it as I don't think it's as a good solution. U have to work on it yourself.
Have a nice day and I hope u are a real "mofo" to do this job! :p

if its illegal then how come you were able to post the info on how to set up the polls? heh, damn...

wooolF[RM] 04-27-2002 05:10 PM

]
Quote:

Originally posted by 212rikanmofo


if its illegal then how come you were able to post the info on how to set up the polls? heh, damn...

looks like u ARE a "mofo"...
well, as I said before (open your eyes bud) I got permissions from the author of hack to use his hack, I asked him personally and he said "yes". So it was 100% legal as I uses source that he wrote y himself (hopefully).
More questions, "mofo" ? :devious:

TECK 04-28-2002 12:15 PM

man.... wooolF, this is so rude the way you put it. please be nice to people...

Wolf42 04-29-2002 03:41 PM

Thanks nakkid!!

This was just the hack I needed. I abused it a little, couse I needed a script in front of an old vbPortal (2.0.1). And your hack did the trick! :D

Once again "THANK YOU VERY MUCH!!".

AussieSat 04-30-2002 12:09 AM

Havn't gotten far re the logging issue. If I put the vBhome index (renamed) into the board directory, login works correctly but it doesn't log me into the actual board at the same time (clicking on any link to the board brings up login again). :confused:
Is my problem so obvious that I should figure it out myself? :ermm:

TECK 04-30-2002 01:40 AM

aussie.. what exacly did you do? what i did me to place the login code was this:

1. i created 1 new template called: home_logincode and placed there the apropriate html code to suit my needs (take a look in forumhome_logincode template for the html code).

2. i added into vbHome the following code:
PHP Code:

if ($bbuserinfo['userid']!=0) {
  
$username=$bbuserinfo['username'];
  
$homelogin "";
} else {
  eval(
"\$homelogin = \"".gettemplate('home_logincode')."\";");



JBMoney 04-30-2002 02:24 AM

How can I get the news display to recognize UBB code? As of now, it's printing out all the UBB codes.

TECK 04-30-2002 02:39 AM

in the vbHome file, is used the function bbcodeparse();
that means everything related to vBcode, smilies, etc is reflected on your forum options.

JBMoney 04-30-2002 03:45 AM

I see this line:

PHP Code:

$newstext=bbcodeparse($getnewssql[pagetext],$newsforum,1); 

That's the only line referring to 'bbcodeparse' that I see and it doesn't seem to be doing the trick. :(

TECK 04-30-2002 03:59 AM

this function is used in VB, in functions.php
curious if anyone else have the same problem?

AussieSat 04-30-2002 07:24 AM

Thanks Nakkid, it helps if one uses the correct code.......
I'll give it a try and see how it goes.

Cheers, AussieSat

JBMoney 04-30-2002 02:42 PM

I figured that out. I had done some customizing and had neglected to change one item.

This isn't a problem, but what VB code would have to be copied to the vbHome index.asp, to make attachments display?

TECK 04-30-2002 05:16 PM

as i said before, i will give support on the addons as much as i can.. i plan on rewriting this hack.. since it uses alot of queries.. please ask other fellows hackers here, i'm sure they will help you..

Bad Bunny 05-04-2002 08:59 AM

This is totally awsome. I will be trying it out to add some more features and such to it. Thanks CO MUCH.

E 05-04-2002 10:44 AM

how would i go about having the newsbit so it displayed the first message on the front page... but havin like a news.php file or something so i can have links next to it of say the last 4 news items before that one so it will look like this

Code:

NEWS                  |  Sidebar
                            | Other News
news message    | News Item 1
bla bla bla            | News Item 2
bla bla bla            | News Item 3

wehn u cliuck the news items it takes u to that piece of news items on a new page..... or this would be easier too make... u could have it so it says OTher News....
and when u click it it takes u too news.php with all 4 of the news pieces..... ??

E 05-05-2002 12:21 AM

k i have news.php done.. but it has the piece on the front page as well as the others.... how can i get rid of the first one editin this code
PHP Code:

// news ***************************
$newssql=$DB_site->query("SELECT * FROM thread
                          WHERE forumid='
$newsforum'
                          ORDER BY dateline DESC LIMIT 
$newsposts");
while (
$news=$DB_site->fetch_array($newssql)) {
  
$newsthreadid=$news[threadid];
  
$newstitle=$news[title];
  
$newstime=vbdate($timeformat,$news[dateline]);
  
$newsdate=vbdate($dateformat,$news[dateline]);
  
$newsusername=$news[postusername];
  
$newsuserid=$news[postuserid];
  
$getnewssql=$DB_site->query_first("SELECT * FROM post
                                     WHERE threadid='
$newsthreadid'
                                     ORDER BY postid ASC LIMIT 1"
);
  
$newstext=bbcodeparse($getnewssql[pagetext]);
  
$newsavatarurl=getavatarurl($newsuserid);
  if (
$newsavatarurl=="") {
    
$newsavatarurl="{imagesfolder}/clear.gif";
  }

  eval(
"\$newsavatar = \"".gettemplate('home_avatar')."\";");
  eval(
"\$newsbits .= \"".gettemplate('home_newsbits')."\";");
}
// end news *********************** 


Bad Bunny 05-08-2002 04:54 AM

I am having images and bbcode appear, but it does not do any line breaks. I wish it did.

Also, in regards to the PM addition, I have followed your instructions, Nekkid, but it does not seem to show up. What is the proper variable to use? $homepminfo like you originally sais?

Woolf, I thank you for sharing the poll addition. But I do have one problem with it. (and no, I am not talking about the hardcoded colors in the code you gave for the php modification :) )
The problem is it seems to forget that I have voted, or not even know it. I cannot get it to show the results after voting.

Again, thanks.

DWZ 05-08-2002 05:45 AM

Is it possible to install vbHome to a subdomain of a site with the forum on the main part of the site?

ie. My forum is installed to http://www.consoleradar.com/forums/ and I want to install it to http://chips.consoleradar.com/

I have put in the right chdir (i think so anyway), I set it to: /home/dwz/public_html/forums The subdomain is located at /home/dwz/public_html/chips

When I run the index.php file in the subdirectory, I just get a blank page.

The other thing is, these templates I have to make, do they have to be part or the Default template set or can it be a custom one?

You see, im hosting a forum for some other people, and they want something like vbHome. Their forum is under a subforum of "Hosted Forums" and then their is a subforum in their forum called "news". Both news and their forum have different templates to the rest of the site. So yeah... I hope that makes some sense :)

Thanks,

Alan

E 05-08-2002 05:51 AM

YES DWZ thats what it ius meant for

DWZ 05-08-2002 06:14 AM

Quote:

Originally posted by E
YES DWZ thats what it ius meant for
good :) this thread hasn't said anything about installing on a subdomian (that I saw), only on the root directory of the site....

So any idea why it wont work?

Bad Bunny 05-08-2002 06:16 AM

Edit. Not using this any longer. Sorry.

DWZ 05-08-2002 06:26 AM

Quote:

Originally posted by Bad Bunny
It takes customization.
I am in the process mysefl. SO far all I have is this

http://neeto.org

sure, i understand that... but I mean, shoudn't there be *something* on the page

even if its only the copyright info at the bottom? lol

Take a look for youself: http://chips.consoleradar.com/

Emma 05-08-2002 05:00 PM

Question. I have Vb home lite installed and everything is running great. I want to add another column to the page. Its going to show what is on tv that certain night. And I wanted it to be able to be updated the same way as the news forum. I thought I could go in and just copy all the news coding and change the names here and there to tvposting (which is what I am calling that section of the page) evidently I can't do that ;) So what adjustments do I need to make in the coding to have those codes appear twice on the page?

Thanks!
Emma

E 05-09-2002 07:27 AM

wait DWZ.. sorry i didnt see the chips bit....... i dont think that will work cuz instead of going up a level to forum its going down then up sorry

Artificial-Evil 05-11-2002 09:34 PM

Sorry if I seem lost but I can't seem to get this to work... newbie at this stuff... for some reason i just get a plain blue screen whn I used the templates... but if I use the orginal then it sort of works... any one have a walk through on how all this works?

Sadie Frost 05-13-2002 07:24 PM

What do you mean by original vs templates?


Okay - stupid question: Is there a way to make this either always use the same style or have the background color etc hard-coded into the file or template?

Mine changes with the color scheme the member has selected, and some of them look really awful with the page layout. Any ideas?

http://www.after-darkness.com/main.php

Edit: I think I have everything but the body text color and the page background color - any ideas on how to keep those from changing with the style? :)


All times are GMT. The time now is 09:15 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.03738 seconds
  • Memory Usage 1,935KB
  • 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
  • (1)bbcode_code_printable
  • (9)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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