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)

Twin-x 11-06-2002 03:24 PM

Quote:

Originally posted by NTLDR


If the picture is placed in the post with vBcode or HTML then it should show on the homepage, if its an attachment it won't.

It is done with vbcode. So no attachments?

http://synthforum.com

NTLDR 11-06-2002 03:46 PM

vBcode Fix:

Find:

PHP Code:

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

Replace with:

PHP Code:

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

Note this will add 1 extra query.

[t4e]Kicks 11-06-2002 04:12 PM

Kicks]I read through about 19 pages of this thread for the problem I'm experiencing and gave up :)

I have a weird issue on the vbindex.php page. It successfully pulls the title of the news post, the icon used for the news post, the number of comments/replies, who posted, and when

The only thing missing is the actual content of the news post. I first thought it was because the characters for news post under the admin cp was set to 0 so I tried changing it to 100 to no avail.

Any feedback is appreciated :)

Maybe it's on one of the pages I didn't get to, but I gave up :D

NTLDR 11-06-2002 04:18 PM

Go into the ACP -> Update Counters -> Update postid's

This will then update your threads table and news posts made before you installed will appear on the site :D

[t4e]Kicks 11-06-2002 06:24 PM

Kicks]That did it! Thanks :)

That's one of the few places I didn't bother checking. The thought didn't even cross my mind.

Thanks!!

Twin-x 11-06-2002 06:24 PM

Quote:

Originally posted by NTLDR
Note this will add 1 extra query.
No problem. It works now.

Second wish c.q. problem.

If i do a sticky it does not stick on the news page. Any codes for me NTLDR ;)

NTLDR 11-06-2002 06:32 PM

Have a look towards the start of the thread I'm not sure if I did this modification before or not.

lemarsu 11-06-2002 08:11 PM

NTLDR,

is there a way to edit online.php so that when you look at who online you don't get something like : Unknown Location: /vbindex.php?

LeMarsu

NTLDR 11-06-2002 08:20 PM

Either install the hack by FireFly so you can add locations from the Admin CP or open online.php and see how the other PHP files are done. Theres two blocks of code for each one.

lemarsu 11-06-2002 08:53 PM

NTLDR,

Thanks
I updated online.php

replaced
PHP Code:

    case 'gallery':
      
$userinfo[where] = "Viewing Picture <a href='gallery.php?s=$session[sessionhash]'>Gallery</a>";
      break; 

by
PHP Code:

    case 'gallery':
      
$userinfo[where] = "Viewing Picture <a href='gallery.php?s=$session[sessionhash]'>Gallery</a>";
      break;
    case 
'portal':
      
$userinfo[where] = "Viewing <a href='vbindex.php?s=$session[sessionhash]'>The Portal</a>";
      break; 

and replaced

PHP Code:

  case '/robots.txt':
    
$userinfo[activity] = 'spider';
    break; 


by

PHP Code:

  case '/robots.txt':
    
$userinfo[activity] = 'spider';
    break;
  case 
'vbindex.php':
    
$userinfo[activity] = 'portal';
    break; 

all seem to work.

lemarsu 11-07-2002 05:52 AM

Have a look at the attached Pic.

As you can see the news that reads "Monster 2003 Weekend"
has "Read Full Post - Comments (0) - by LeMarsu - 06-11-2002 08:39 AM" completely out of line. It in not on the bottom right, plus there is some text from the post attched to it.

SAmi

NTLDR 11-07-2002 10:02 AM

Does that post happen to use HTML?

lemarsu 11-07-2002 10:10 AM

there is no html just BB code.


thread is here :

http://ducati.artscience.tv/monster/...p?threadid=522


Code:

THE 1st UK MONSTER WEEKEND!

Please keep Sat 24th - Mon 26th May 2003 free in your diary's.
Location : just s/w of Stratford
Camping, limited B&B, catering on site.
Rideouts on the Sat and Sun - so if you cant come overnight - just pop in on the day!

Details in full will follow by mid dec.


keep an eye out at This Post


NTLDR 11-07-2002 10:30 AM

Its becuase you have the character limit on and the limit happens to be in the middle of a <a href=".... thus there is no "> on the end of it, altering that should solve the problem :)

jazza 11-07-2002 11:59 AM

ok, i got it all installed and there are no errors or anything, i just still appear on my forum home, i was looking at step 6 and thaught that would prolly sort it out, but im not sure on what to do. can someone pelase help :)

NTLDR 11-07-2002 01:39 PM

.htaccess will only work if your using Apache, your host allows it and you have placed the file in the same directoty as vbindex.php

jazza 11-07-2002 07:39 PM

apache version 1.3.26, ok, so, how do i do this ?

NTLDR 11-07-2002 07:44 PM

The instructions tell you exactly what to do ;)

jazza 11-07-2002 08:28 PM

meh . but whats a .htaccess file , sorry , im new to almost everything, baring php,... altho i still suk at that :(

NTLDR 11-07-2002 08:31 PM

Create a file called .htacess just like the instructions say with the content they say.

jazza 11-07-2002 08:41 PM

lol, im so dumb, anyway, i couldnt find all the files, altho its roly just me bein thik, so im givin up, cheers for the help anyway

NTLDR 11-07-2002 10:07 PM

Every file thats required is in the Zip along with step by step instructions. All anyone has to do is read them to be able to install this hack.

kreftt 11-07-2002 10:07 PM

the installer did something really weird:

i had it update my 2.01 installation.
it added the new database field fine, but when it came to the templates, it did the following:

it added my modified templates again. every template doubled, with even the same templatesetid.

i had to do a
delete from template where title like 'home_%'
and reinstall the default templates with your installer...

just fyi

kreftt

edit: and btw, its the best portal solution ive seen so far, and as firefly doesnt answer emails on how to pay for his vportal, it will most likely stay the best

edit2: is there any chance you could attach the 2.01 templates again to have araxis merge tell me the changes? i have heavily modified my templates (and translated) and wouldnt really like to do everything again.

tia

kreftt

NTLDR 11-07-2002 10:14 PM

Strange, it should delete all your templates first.

Thanks for the comments, its nice to know that the work thats gone in has been apriciated.

I've attached a copy of the only set of v2.0.1 templates that I have in a zip :) (Note, they all start vbidemo_ but they are the same as the home_ ones were ;))

kreftt 11-07-2002 10:18 PM

it cant delete the old ones:

your file says:

PHP Code:

if ($step==install or $step==upgrade201) {

[
unneccessary for the explanation]

$step=templates;



while its should say

PHP Code:

if ($step==install) {

[
unneccessary for the explanation]

$step=templates;



AND

PHP Code:

if ($step==upgrade201) {

[
unneccessary for the explanation]

$step=cleantemplates;



at least as i understand it...

thanks for the templates

lemarsu 11-08-2002 02:17 PM

NTLDR

I would like to say thank you for all you help and sorry for all the stupid questions I have posted up in the last few months as I was learning about php and Vbulletin.
The users of the forum love your vbindex and the integration of the shoutbox. (why don’t you do a similar addition with the weather?)
I would really like to thank you for the addition of being able control vbindex via the Admin CP.

I would like to add this is a great hack!.

Got to go and pretend I am working while I trying to add one more piece of functionality.

Thanks

LeMarsu

NTLDR 11-08-2002 02:31 PM

Quote:

Originally posted by lemarsu
NTLDR
(why don?t you do a similar addition with the weather?)

I may post up some tutorials on how to add some other popular things to vBindex. The problem with adding them in by default is that I don't want to bundle up a set of hacks and then make it look like they are mine.

Thanks for the comments and feedback :)

Buddha 11-08-2002 03:05 PM

fyi ntldr, the same thing happened with me when i tried to upgrade from 2.01 wherein it just doubled all the home_ templates. i just deleted them all with your installer and reinstalled them and it was fine.
i just thought that was a step in the instructions that must have been missing.

btw, the new theme's going great. you designed vbindex in such a way that moving things around is a breeze.
thanks bud.

NTLDR 11-08-2002 03:06 PM

I shall look into that for v2.2 if I ever do it ;)

I'm looking forward to seeing your site Buddha, it sounds impressive :D

kreftt 11-09-2002 04:03 AM

for those who have the problem with their bbcodes breaking in pieces when characterlimit is reached:

i think i found a solution, which allows the following things:

-have admins post html
-have the "read more" whether the post is over the limit or not
-have the post cut itself in front of a bbcode that would be cut in half by the character limit
-have the post cut itself in front of a html tag that would be cut in half by the character limit
-have the news post follow the "use smilies" option that you set when you post the news

YOU MUST NOT

- use [ tags in your news posts except in bbcode

- use slashes inside html arguments. means you can do
Code:

<a href="http://ww.vbulletin.org/forum">vb.org</a>
but you cannot use
Code:

<a href="http://ww.vbulletin.org/forum">http://ww.vbulletin.org/forum</a>
you can use slashes in the rest of the post

what you need to do is to is to

1) backup your vbindex.php

2) replace the whole news section
(starting with:
Code:

// news (based on code by TECK)
and ending with
Code:

// end news
)

with the code below
from how i understand it there are no additional queries, and from how i understand it it was the first time i used all these functions so there might be errors. it works for me though.

PHP Code:

// news (based on code by TECK)
// has pieces of entourage's admin html allow hack
// -------------------------
if ($newsonoff!=0) {
// $newsquery=$newsquery=$DB_site->query("SELECT thread.*,threadpost.pagetext AS pagetext FROM thread LEFT JOIN post AS threadpost ON (thread.firstpostid = threadpost.postid) WHERE forumid = '$newsforum' ORDER BY thread.dateline DESC LIMIT $newsposts");
$newsquery=$newsquery=$DB_site->query("SELECT thread.*, user.usergroupid AS usergroupid, threadpost.pagetext AS pagetext, threadpost.allowsmilie AS allowsmilie FROM thread LEFT JOIN post AS threadpost ON (thread.firstpostid = threadpost.postid) LEFT JOIN user ON (thread.postuserid = user.userid) WHERE forumid = '$newsforum' 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];
  
$newsusergroupid=$news[usergroupid];
  
$newsallowsmilie=$news[allowsmilie];
  
$newsuserid=$news[postuserid];
  
$comments=$news[replycount];
  
$icon=$news[iconid];
  
// uncomment out next line to remove line breaks in the news
  //$newstext=str_replace("<br />","",$newstext);

$pagetext=$news['pagetext'];

// max news chars
if (strlen($pagetext) >= $maxnewschars) { 
                
$pagetext=substr($pagetext,0,$maxnewschars); 
    
$pagetext=substr($pagetext,0,strrpos($pagetext," ")); 
    
// does this post have bbcode?
    
$pos=strrpos($pagetext,"[");
        if (
$pos === false) {
            
// if no, then do nothing
        
} else {
            
// check the distance between the last / and the last [ of the post.
            // if its +1 we are outside bbcode and safe
            
$needle1="/";
            
$pos1=strlen($pagetext) - (strpos(strrev($pagetext), strrev($needle1)) + strlen($needle1));
            
$needle2="[";
            
$pos2=strlen($pagetext) - (strpos(strrev($pagetext), strrev($needle2)) + strlen($needle2));
            
$pos3 $pos1 $pos2;
                if (
$pos3 >= 1) {
                    
// we are outside bbcode
                
} else {
                    
// we are in bbcode, so we have cut it away
                    
$pagetext=substr($pagetext,0,strrpos($pagetext,"[")); 
                }
        }
    
//does this post have html ?
    
$posh=strrpos($pagetext,"<");
        if (
$posh === false) {
            
// if no, then do nothing
        
} else {
            
// check the distance between the last / and the last < of the post.
            // if its +1 we are outside html and safe
            
$needleh1="/";
            
$posh1=strlen($pagetext) - (strpos(strrev($pagetext), strrev($needleh1)) + strlen($needleh1));
            
$needleh2="<";
            
$posh2=strlen($pagetext) - (strpos(strrev($pagetext), strrev($needleh2)) + strlen($needleh2));
            
$needleh3=">";
            
$posh3=strlen($pagetext) - (strpos(strrev($pagetext), strrev($needleh3)) + strlen($needleh3));
            
$posh4 $posh1 $posh2;
            
$posh5 $posh1 $posh3;
                if (
$posh4 == 1) {
                    
// we are outside html
                
} elseif ($posh4 1) {
                    
// we are inside a html-tag, so we cut it away
                    
$pagetext=substr($pagetext,0,strrpos($pagetext,"<")); 
                } elseif (
$posh4 1) {
                        
// we could be everywhere if there are slashes in the post
                        
if ($posh5 $posh4) {
                            
// we are inside a tag as the way from the last / to the last <
                            // is shorter than the way to the last >, so we cut
                            
$pagetext=substr($pagetext,0,strrpos($pagetext,"<")); 
                        } else { 
                            
// we are right after a html tag as someone uses slashes in posts
                            // < is farer than > away, no need to do sth
                        
}
                }
        }

    
$pagetext=$pagetext." ..."
    
$readmore="<a href=\"$bburl/showthread.php?threadid=$newsthreadid\">Read full post</a> - ";
} else {
    
$readmore="";
}
// end max newschars

if ($newsusergroupid == 6) {
$newstext=bbcodeparse2($pagetext,1,1,$newsallowsmilie,1);
} else {
$newstext=bbcodeparse($pagetext,$newsforum,$newsallowsmilie,1);
}


// get users avatar to display with news
if ($shownewsavatar!=0) {
$newsavatarurl2=getavatarurl($newsuserid);
  if (
$newsavatarurl2=='') {
    
$newsavatarurl="$bburl/https://vborg.vbsupport.ru/images/clear.gif";
  } else {
  
$newsavatarurl=''.$bburl.'/'.$newsavatarurl2.'';
  }
  eval(
"\$newsavatar = \"".gettemplate('home_avatar')."\";");
}
// end avatar
  
eval("\$newsbits .= \"".gettemplate('home_newsbit')."\";");
}
eval(
"\$news = \"".gettemplate('home_news')."\";");
}
// -------------------------
// end news 

and as this board here parses bbcode even in php-tags, you will need to replace the link $newsavatarurl with your own clear.gif, as it now leads to vbulletin.orgs clear.gif

feedback appreciated

kreftt

Odil 11-09-2002 10:46 AM

I get the following code when viewing the vbindex page as a guest:

Warning: unexpected error in date() in C:\DDVBBoard\upload\admin\functions.php on line 1613

This is installed on 2.8 version. Do you have any idea how to fix this? Thanks.

Odil

bromyaur 11-09-2002 04:00 PM

my first post here lol, Ok I read the whole 72 pages last night and again today lol but dont see a fix, well the one I do isnt working on a permanent basis.

great hack by the way and thank you.

I installed it on my test forum and works perfectly.

Installed it on my real forum and works great too.However when I make a new news post the content doesnt show up. So I ran the set post id, then found the update counter addition and added that. It works for the new post I made. But then if I were to go add another news item today I would have to update the post id's again for the content to show.

Which is no big deal since I will be the only one entering new items anyway. I must have missed something though.So if you can point me in the right direction it would be appreciated.I am sure I never saw this in the 72 pages but who knows i may have missed it, if so ignore me lol

Here is my real forum, the news shows now since I updated the id's after I posted.

http://www.graphicsteck.ca/vb/vbindex.php?s=



Side note I am helping another person install his and he gets it installed fine, the templates are there but no link to the vbindex in the ACP

NTLDR 11-09-2002 06:40 PM

bromyaur, you haven't followed the instructions, you need to make the changes to newthread.php ;)

NTLDR 11-09-2002 06:46 PM

Quote:

Originally posted by kreftt
-have the "read more" whether the post is over the limit or not
As the Comments (x) links to the thread I saw no point in having both there.

I will test this code out kreftt, can I add it to the next release, with full credit given of course?

bromyaur 11-09-2002 08:29 PM

Oh lolololololol

Sorry about that, thats what happens when you install it twice, and during the process are posting messages back and forth in another forum trying to help someone else install theirs while being very tired lol

Note to everyone..

Make sure you have more than 3 hours sleep when installing hacks.lolololol

Sorry about that

NTLDR 11-09-2002 08:31 PM

*hehe* No Problem, we've all installed hacks real late or after getting no sleep, its not the best time ;)

kreftt 11-09-2002 11:37 PM

Quote:

Originally posted by NTLDR


As the Comments (x) links to the thread I saw no point in having both there.

I will test this code out kreftt, can I add it to the next release, with full credit given of course?

oh in case this works, id be honored if you did.

there is really no point in having a read more link, but the current vbindex always displays the link, as the condition is the existence of the maxnewschar-variable. so i thought it might be better to chage the condition, but in fact you are right: its useless.

Buddha 11-10-2002 02:28 PM

hey bromyaur, i like the colors you've used on your site.

fyi, you need to change the color of the font in your polls template.

"votes: 2 100%" is white, on a white background, so you can't read it without highlighting it.

just in case you weren't already aware.

*edit*
also checked, and your shoutbox title is white on a white background. you may want to change that too, bud.

take care.

jmd 11-10-2002 03:09 PM

I love the hack but for some reason I have a url location problem. I hope you can help with this.

Please keep the instructions simple and detailed LOL I?m not the best at doing this kind of stuff.

Thanks in advance

Joe





I recently installed vbindex 2.1 on my forum. Everything?s working fine except that the portal is located at http://www.myurl.com/vb/ instead of www.myurl.com

My forum is at http://www.myurl.com/vb/index.php How do I get my portal to view at www.myurl.com

and my forum to view at http://www.myurl.com/vb/index.php

I followed the instructions and put the vbindex.php in the vb directory but I can?t get it to view at the proper url




((I saw this on the instructions do I do something with this and if so what would I do .)))


If you intend to run vbindex from a directory other than the one your forums are in uncomment & set:

chdir('./path to forums');

to the path to your forums directory relitive to the directory vBindex is run from.





{{{Or do I need a redirect script and if so can you tell me what to put in it and were to}}} upload it. (im using cpanel if it helps to know)

Thank you for your help

kreftt 11-10-2002 05:57 PM

you would move your vbindex.php to myurl.com

you rename it to index.php

then you change the line that you posted to:

chdir('./vb');

then you should be set...


All times are GMT. The time now is 02:10 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.03184 seconds
  • Memory Usage 1,921KB
  • 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
  • (5)bbcode_code_printable
  • (10)bbcode_php_printable
  • (5)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