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)
-   -   vBindex v2.1 (https://vborg.vbsupport.ru/showthread.php?t=41916)

Limpkinw 01-04-2003 05:36 AM

I uninstalled vbindex today and now I get this error when making new posts. Would it be related? please help!

Database error in vBulletin 2.2.6:

Invalid SQL: UPDATE thread SET tpostid='24040' WHERE threadid='1097'
mysql error: Unknown column 'tpostid' in 'field list'

mysql error number: 1054

Date: Saturday 04th of January 2003 01:30:26 AM
Script: http://www.limpkinw.com/forums/forums/newthread.php
Referer: http://www.limpkinw.com/forums/newth...read&forumid=1

colicab-d 01-04-2003 02:14 PM

Hi is it possible to include these variables in the index?

i tried just inserting them as i have here but nothing is displayed apart from the time variable.

thnx for any help :D

$numbermembers

$newusername

$totalthreads

$totalposts

$timenow (this one is working)

NTLDR 01-04-2003 06:55 PM

Quote:

Originally posted by Limpkinw
I uninstalled vbindex today and now I get this error when making new posts. Would it be related? please help![/url]
You haven't uninstalled it properly, you need to do the reverse of all the changes you made whilst installing, the uninstaller can't do the changes you made.

NTLDR 01-04-2003 06:57 PM

Quote:

Originally posted by colicab-d
Hi is it possible to include these variables in the index?

i tried just inserting them as i have here but nothing is displayed apart from the time variable.

Yes, you just need to include the code that generates the contents for them, they look like they all come from index.php, just add the code at the top around // posts info

Katana Myronson 01-04-2003 07:33 PM

I cannot get the text of the news post to display... i tried updating the counters but it did not work..

colicab-d 01-04-2003 08:35 PM

PHP Code:

// get total posts
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=number_format($countposts['posts']);

$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread');
$totalthreads=number_format($countthreads['threads']);

// get newest member
$getnewestusers=$DB_site->query_first("SELECT userid,username FROM user WHERE userid=$numbersmembers[max]");
$newusername=$getnewestusers['username'];
$newuserid=$getnewestusers['userid']; 

im guessing thats the code for a few of them, but where would i insert this?

NTLDR 01-04-2003 08:44 PM

Quote:

Originally posted by NTLDR
just add the code at the top around // posts info

Buddha 01-06-2003 12:08 PM

hey ntldr... me again.
:nervous:

listen, new quirk.
as you no doubt remember, you've helped me change the news bit quite a bit for my pages, so i'm going to quote all of it (cause it's nowhere near the default anymore).
the problem is that if anyone other than me posts and uses bbcode (like color), it doesn't display the color (just the text bbcode... like [ color=blue ]this[ /color ] ... without the obvious spaces).
part of this is no doubt cause we set it up so i could post html without anyone else having that ability, but in so doing, they can't post bbcode now.
i think it's the 'else' tag, but i don't know what it should be.
any help, as always, is greatly appreciated.

PHP Code:

// news (based on code by TECK)
// -------------------------
if ($newsonoff!=0) {
$newsquery=$newsquery=$DB_site->query("SELECT thread.*,threadpost.pagetext AS pagetext FROM thread LEFT JOIN post AS threadpost ON (thread.tpostid = threadpost.postid) WHERE forumid = '$newsforum' AND thread.visible='1' ORDER BY thread.dateline DESC LIMIT $newsposts");
while (
$news=$DB_site->fetch_array($newsquery)) {
  
$newsthreadid=$news[threadid];
  
$newstitle=$news[title];
  
$newstime=vbdate($timeformat,$news[dateline]);
  
$newsdate=vbdate($dateformat,$news[dateline]);
  
$newsusername=$news[postusername];
  
$newsuserid=$news[postuserid];
  
$comments=$news[replycount];
if (
$news[postuserid]==1) {

  
$newstext=bbcodeparse2($news[pagetext],1,1,1,1);

  } else {

  
$newstext=bbcodeparse($news[pagetext],0,1);

}
  
$newstext=str_replace("Quote:"""$newstext);
  
$icon=$news[iconid];
  
// uncomment out next line to remove line breaks in the news
  //$newstext=str_replace("<br />","",$newstext);
  // max news chars
  
if ($maxnewschars!=0) {
     if (
strlen($newstext) > $maxnewschars) {
        
$newstext substr($newstext,0,$maxnewschars);
        
$newstext .= "...";
     }
   
$readmore="<a href=\"$bburl/showthread.php?threadid=$newsthreadid\">Read Full Post</a> - ";
  }
  
// end max newschars
  
eval("\$newsbits .= \"".gettemplate('home_newsbit')."\";");
}
eval(
"\$news = \"".gettemplate('home_news')."\";");
}
// -------------------------
// end news 

thanks.

todd.o.callen 01-07-2003 12:28 PM

Thanks to your assistance, I have created a custom template that I call into your home template. Works great! :classic:

After reviewing my custom layout of the vbindex.php page, I decided that the new template really belongs in the left column (and therefore in your left template), but when I call it into that template, nothing from it displays.

I have a feeling that it has something to do with the order of the templates, but I am outta my depth here still.

Any suggestions?

NTLDR 01-07-2003 12:40 PM

Quote:

Originally posted by Buddha
the problem is that if anyone other than me posts and uses bbcode (like color), it doesn't display the color (just the text bbcode... like [ color=blue ]this[ /color ] ... without the obvious spaces).
It take it that vBcode is enabled for that forum that the user is posting too? The code seems to be correct, if you do have vBcode enabled then I'll take a look further into this.

NTLDR 01-07-2003 12:41 PM

Quote:

Originally posted by todd.o.callen
After reviewing my custom layout of the vbindex.php page, I decided that the new template really belongs in the left column (and therefore in your left template), but when I call it into that template, nothing from it displays.
Make sure that this template (or content) is done before the left templated is eval'ed at the end of the file :)

todd.o.callen 01-07-2003 12:55 PM

Sorry,

Can you translate this hint for the code challenged? Assuming it isn't "done" before left is called, how do I fix it?

PS. Life is good when U R online...

NTLDR 01-07-2003 12:56 PM

Move it above:

PHP Code:

eval("\$left = \"".gettemplate('home_left')."\";"); 


todd.o.callen 01-07-2003 01:47 PM

Dude-who-looks-like-a-lady,

You rock. Simple edit. Everything works perfectly. Thanks!

Buddha 01-07-2003 05:09 PM

yep... vbcode is enabled, ntldr.

any thoughts?

NTLDR 01-07-2003 05:16 PM

I've just tested it and it works fine for me, is the content of the post correct, ie when editing the post the code is [color=blue ]Text[ /color] (without the spaces)?

Buddha 01-07-2003 05:41 PM

yep.
would it matter that the forum in question has a moderation queue?
i have to approve it in the admin cp before it goes out.

i'll test it without the mod queue and see.

edit**
mod queue removed, and it still did the same thing.

todd.o.callen 01-08-2003 04:41 PM

How do I modify the post query so that posts in Private forums (and any other forums the user can't see) will not show up?

Thanks. God I love this hack.

todd.o.callen 01-08-2003 06:03 PM

Quote:

Originally posted by todd.o.callen
How do I modify the post query so that posts in Private forums (and any other forums the user can't see) will not show up?

Thanks. God I love this hack.


I tried to apply your advice from a response a few pages ago regarding the news query, by it didn't seem to help:


$threadsquery=$DB_site->query("SELECT * FROM thread WHERE thread.open<>10 ".$threadsql." AND thread.visible=1
AND forumid!=$newsforum AND forumid!=$pollsforum AND visible=1 ORDER BY lastpost DESC LIMIT $maxvbithreads");


My guess is tha thread.visible=1 and visible=1 are the redundant, but I am not a very good guesser.

NTLDR 01-08-2003 07:07 PM

Yes, you can remove visible=1 ;)

Rodney 01-09-2003 06:32 PM

Hi I`m getting this error

PHP Code:

Warningdate() [function.date]: Unexpected error in D:\cancan\forum\admin\functions.php on line 1599 

I tried with vb 2.2.9 and now with 2.2.7 still the same error..

I?m running vbindex on my test board and i made a clean install ( no other hacks ) of vb when I got this error :(

I got the vbindex.php in the same dir as index.php so I skipped step 4 and 11

( i looked to page 30 before I posted this question )

todd.o.callen 01-09-2003 06:37 PM

I would like to use the usercp_forums template on the vBindex.php layout. I tried just adding it to the declarations:

Quote:

...

$templatesused.=',home_shoutbox,home_postshout, home_xxxlinks';
$templatesused=',usercp_forums, usercp_forumbit';

...

Then added the evaluate lines:

Quote:

eval("\$xxxlinks = \"".gettemplate('home_xxxlinks')."\";");
eval("\$myforums = \"".gettemplate('usercp_forums')."\";");

eval("\$left = \"".gettemplate('home_left')."\";");
eval("\$right = \"".gettemplate('home_right')."\";");
Then added it to the home template:

Quote:


<center><strong><font face="Arial" color="990000">My Forum Subscriptions</font></strong></center>
$myforums
<br><br>


But this wasn't enough. I get the usercp_forums layout, but no usercp_forumbit (s).

I assume that I have some pathing issues with the "external-to-vBindex" template, but that may not be all.

Hints? :cheeky:

NTLDR 01-09-2003 07:41 PM

You'll need to copy the code from usercp.php that creates the content that usercp_forumbit displays, plus you would need to eval usercp_forumbit too.

todd.o.callen 01-09-2003 07:44 PM

Quote:

Originally posted by NTLDR
You'll need to copy the code from usercp.php that creates the content that usercp_forumbit displays, plus you would need to eval usercp_forumbit too.
OK, I knew the 2nd evaluate was coming, but where does the usercp_forumbit code go? :confused:


My new evals are:
Quote:

eval("\$myforumbit = \"".gettemplate('usercp_forumbit')."\";");
eval("\$myforums = \"".gettemplate('usercp_forums')."\";");

NTLDR 01-09-2003 07:50 PM

Put it near the top, again around //posts info, thats the safe place to put added code ;)

todd.o.callen 01-09-2003 07:59 PM

Your are a beautiful man with trashy avatar.

Thanks once again! :rambo:

Rodney 01-09-2003 08:02 PM

NTLDR , any ideas about : Warning:_date()_[function.date]:_Unexpected_error_in_D:cancanforumadminfunctions. php_on_line_1599 ?

http://217.215.68.215/cancan/forum/vbindex.php

NTLDR 01-09-2003 08:06 PM

Whats on and arround your line 1599 in admin/functions.php ?

Rodney 01-09-2003 08:10 PM

PHP Code:

###################### Start show_nopermission #######################
function vbdate($format,$timestamp) {
  global 
$bbuserinfo,$timeoffset;

  return 
date($format,$timestamp+($bbuserinfo['timezoneoffset']-$timeoffset)*3600);

}

// ##################### Save birthdays into template ################### 

1595 to 1603

vbindex is installed on a clean board ... no other hacks and shoutbox is turned off in acp

NTLDR 01-09-2003 08:19 PM

I don't see why thats not working, it works fine with that code for me. Try replacing (in vbindex.php) vbdate( with either date( or gmdate( and see if that removes the error.

Rodney 01-09-2003 08:22 PM

Nice.... it worked..

i changed to " date "

Buddha 01-10-2003 12:40 PM

Quote:

Originally posted by NTLDR
I've just tested it and it works fine for me, is the content of the post correct, ie when editing the post the code is [color=blue ]Text[ /color] (without the spaces)?
you tested it with the exact same code as i posted? that's bizarre, cause it still isn't working, and i've tried several other things, and nothing seems to work. no vbcode works (including smilies) for users other than myself (user 1). i assumed it was because of this chunk of change here...

PHP Code:

if ($news[postuserid]==1) {

  
$newstext=bbcodeparse2($news[pagetext],1,1,1,1);

  } else {

  
$newstext=bbcodeparse($news[pagetext],0,1);



any help (as always) is greatly appreciated.

thanks.

NTLDR 01-10-2003 01:34 PM

Yep, exactly the same, try using bbcodeparse2 for the other members too:

PHP Code:

$newstext=bbcodeparse2($news[pagetext],0,1,1,1); 

That assumes that you wish to parse vBcode, [IMG] code and smilies. (Change the first 1 to 0 if you want to disable [IMG] code).

Buddha 01-10-2003 01:54 PM

once again, you've come through for me. thank you very much.

i had tried changing the bbcodeparse in the else tag and adding the 2, but it had given me an error, probably cause i hadn't changed the 0s and 1s like you did.

thanks buddy.

Danny 01-11-2003 06:53 PM

I'm getting some missing pictures on my homepage can you have a look please ?

the url of the test site is http://www.4size.co.uk

pictures on the forum are fine pictures on the home page of vbindex aren't :(

Rodney 01-12-2003 12:22 AM

Hi again...

how can you get Private messages to show right under your buddy list ? ( or under the poll )

I tryed to put pminfo under buddy but it didn?t work ( in home_left template )

also missing a href in head_newpm ( my vbindex is not in the same dir as my forum )
PHP Code:

<script language="JavaScript">
<!--
function 
confirm_newpm() {
    
input_box=confirm("You have a new private message. Click OK to view it, or cancel to hide this prompt.");
    if (
input_box==true) { // Output when OK is clicked
        
second_box=confirm("Open in new window?\n\n(Press cancel to open your $inboxname in the current window.)");
        if (
second_box==true) {
            
window.open('private.php?s=$session[sessionhash]','pmnew','width=600,height=500,menubar=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,resizable=yes,top=50,left=50'); 
        } else {
            
window.location="private.php?s=$session[sessionhash]";
        }
    } else {
    
// Output when Cancel is clicked
    
}
}
// -->
</script


Rodney 01-12-2003 12:27 AM

Quote:

Originally posted by Danny
I'm getting some missing pictures on my homepage can you have a look please ?

the url of the test site is http://www.4size.co.uk

pictures on the forum are fine pictures on the home page of vbindex aren't :(

I changed my images path to
http://xxx.xxx.xxx.xxx/cancan/forum/images
http://xxx.xxx.xxx.xxx/cancan/forum/images/test.gif
and so on........

Rose 01-12-2003 12:53 AM

That's because your images folder is within your forums folder (where it should be). In the admin CP go to styles - modify - fonts/colors/etc. Make sure the "image folder path" points to "/forum/images" and that should fix your problems.

If not you might try changing the image locations (in the templates or via replacements) to "$bburl/images/picture.jpg" etc. But make sure your $bburl points to the forums (Admin CP > vBulletin Options > General Settings > URL).

Good luck!

xevious 01-12-2003 02:49 PM

Ok, I dont know if this was covered earlier or not, too many pages :). But I am building a gaming site and im using vbindex to do it. Is it possible to run mulitple copies of vbindex but use the same forum? Lets say i am gonna cover 4 games, I want one main index then an index for each game and seperate news for each game, but they all use the same forum. Is this possible? If so, how?

xevious 01-12-2003 03:20 PM

Nm, i figured out how to do it. Thnx anyways...:)


All times are GMT. The time now is 10:38 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.02708 seconds
  • Memory Usage 1,877KB
  • 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
  • (8)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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