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)
-   -   mYvBindex v3.1 (https://vborg.vbsupport.ru/showthread.php?t=44691)

bobII 06-05-2003 02:50 PM

Thanks for the speedy reply. Does it matter where I place the code in global.php?

Tigga 06-05-2003 02:57 PM

Yes, there are some places you could put the code where it would not work. I'd recommend placing it right below this code:
PHP Code:

eval("\$footer = \"".gettemplate('footer')."\";"); 

Then if you look about 20 lines above that, you'll see a $templatesused section. You should be sure to add the name of your new template to that section as well to avoid having an unnecessary query on those pages. ;)

bobII 06-05-2003 03:28 PM

Quote:

Today at 11:57 AM Tigga said this in Post #1362
Yes, there are some places you could put the code where it would not work. I'd recommend placing it right below this code:
PHP Code:

eval("\$footer = \"".gettemplate('footer')."\";"); 

Then if you look about 20 lines above that, you'll see a $templatesused section. You should be sure to add the name of your new template to that section as well to avoid having an unnecessary query on those pages. ;)

Thanks, I'll give that a try! :classic:

reismarktq2 06-06-2003 04:36 PM

Tigga:

I have the Store Hack and the Country Flag hack installed on my site. I'd like to be able to display the user's points total (from the Store hack) and the user's chosen flag (from the Country Flag hack) on my website. What code do I need to add to myvbindex.php to do this? (Merely adding the variables to the templates doesn't work.)

Tigga 06-06-2003 04:45 PM

reismarktq2 - Adding $bbuserinfo[storep] to one of the templates should display the users current store points. I did a quick search for "Country Flag", but found 3 different hacks. If you can post a link to the one you're using I'll take a look and see if I can tell you what would need to be added for that one.

reismarktq2 06-06-2003 05:04 PM

AJR's Country Flag Hack - https://vborg.vbsupport.ru/showthrea...threadid=27485

One more thing that I can't find in the thread: I want to edit the threadbit so that it displays the name of the last user to post in a thread instead of the name of the creator of a thread. What's the code for that? (I know it's just a template change...)

Tigga 06-06-2003 06:14 PM

I haven't tested this, but I'm pretty sure it should work... In your myvbindex.php file look for:
// Show Avatar

Above that Add:
PHP Code:

// Country Hack
if (!$bbuserinfo['country']) {
  
$flag "";
} else {
  
$Country=$bbuserinfo['country'];
  
$Countryalt str_replace("%20"," ",$Country);
  
$flag "<img src=\"images/flags/$Country.gif\" alt=\"$Countryalt\" align=\"absmiddle\" border=\"0\">";
}
// Country Hack End 

Then you would just use $flag whereever you would like their flag to appear.

For the latest threads part, if you look in your index_threadbit template you will see this code in the link to the thread:
title="Last post at $lastposttime by $thread[lastposter]"
That's what shows the last post time and last poster, so you would just move that to whereever you would like it to display. ;)

reismarktq2 06-06-2003 06:52 PM

One minor problem with that code: The flag doesn't display because the %20 is still showing up in the image URL. I tried to change $Country to $Countryalt in the IMG SRC to get around it, but that didn't work...

ivanmcp 06-06-2003 07:25 PM

Tigga,

Check your pm and reply :)

ivanmcp 06-08-2003 06:57 AM

Lol, calendar has gone weird again. 8th of June does not belong anywhere. :confused:

spick 06-08-2003 05:02 PM

um why does it show images from my image folder

when i did a replacement for it do get images from elsewhere.?

Tigga 06-09-2003 01:00 AM

reismarktq2 - I'm really not sure why that wouldn't work... Most of the code there was taken from the postbit section for the flags hack, so it should work. I checked one of the flags in your postbit section and it was working fine and did contain %20 in the url, so perhaps it's something else? If you can't figure it out, if you could post the url that the image is pointing to I will try to help you figure out the problem.

ivanmcp - Checked and replied. ;) I'll try to re-write the calendar section for the hack as soon as I get the time. It does at least work properly if someone hasn't changed their "Start of the week" in their profile, so at least it shouldn't affect too many people. Re-writing the calendar part will require a bit of work and these last couple of weeks have been very busy for me. Hopefully though the next couple won't be quite as bad and I'll have the time to re-write the calendar, but unfortunatly I can't make any promises.

spick - I'm assuming you mean the URL for your header images and such is pointing to /images/ instead of /forum/images? If so then you need to modify your images path for each style you have as instructed in the install file.

scotty 06-09-2003 11:13 AM

Quote:

Yesterday at 09:57 AM ivanmcp said this in Post #1370
Lol, calendar has gone weird again. 8th of June does not belong anywhere. :confused:
hm - I changed (beside of the daynames) two lines and it is now working for me:

first
find:
Code:

$today = vbdate('m-d',time());
replace:
Code:

$today = vbdate('d-m-Y',time());
(this is my date-format, as entered in the CP and I have the "today"-hack installed...)

second
find:
Code:

        if (!$bbuserinfo['startofweek']) {
                $bbuserinfo['startofweek'] = '1';
        }

replace:
Code:

        if (!$bbuserinfo['startofweek']) {
                $bbuserinfo['startofweek'] = '2';
        }

Now the start of the weeks is monday, as used in germany.
and the calculation of the weeks is working now.

reismarktq2 06-09-2003 07:43 PM

Figured it out, Tigga - $bburl should have preceded images in the img SRC. Working now. :)

Skipsoutdoors 06-09-2003 09:24 PM

I have it installed, but haven't made it my home page just yet. Probably will shortly. I like the calendar atatchment. I have been using home lite but really wanted my calendar included.

Anyhow, I have a few other things I'm wanting to do.

There are 2 custom templates included with the program which I have utilized. 1 is going to be my navigation setup, the other will probably be some links. I would like to figure out how to add other custom templates to the set up that could be turned on and off from the Admin panel and used in a similar manner. Is this possible?

I also want to eventually build pages that break out the individual forums from the board. Example: I run an outdoor site and have included a separate Forum for each of the lakes in this area. I want to build pages for the lakes that have specific lake information other than the reports from the board as well as advertising for those local businesses. Somewhere in that page, I want to put its forum. I haven't yet figured out how to do that. I'm no programmer, just trying to figure out how to get this system to do what I want it to do. I notice that with the index template, you use something like this to include other templates in it $calendar. How could you include other templates not in group of myVbindix. Example $forumid135 or $home_quicklinks. Maybe you have to add the other templates to the myVbindex group. If so, how do you do that?

Skip

jdmuniverse 06-10-2003 12:13 AM

It says this on my index page...

Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site30/fst/var/www/html/index.php:6) in /home/virtual/site30/fst/var/www/html/forums/admin/functions.php on line 1614

This happened when I changed from an HTML index page to myvBindex as my index page. The funny thing is it doesn't do it ALL the time.

Any help, ideas??

Thanks in advance!

Tigga 06-10-2003 01:42 AM

reismarktq2 - Glad you figured out the problem. :)

Skipsoutdoors - If you'll refer to this post I have updated the instructions there to include options to turn these new templates on/off. If you are trying to include other templates on your homepage, you would have to follow the same instructions there, except you would change the name of the custom template to the name of your current template.

jdmuniverse - Have you modified your original myvbindex.php file in any way? Can you post here or PM me with a link to your site?

Skipsoutdoors 06-10-2003 02:53 AM

That should help. This is a really nice hack, and I appreciate your taking the time to help people like me who are constantly having troubles.

Skip

Intex 06-10-2003 06:16 PM

Tigga - another quickie if you don't mind :). Today my homepage is taking an eternity to display. I used the old ?explain=1 at the end of the link to see what queries / times were being executed. It produced the following:

Code:

Query: SELECT * FROM weather_userdata WHERE userid='1'
Time before: 0.22496795654297
Time after:  0.22560501098633

table type possible_keys key key_len ref rows Extra
weather_userdata  const  PRIMARY  PRIMARY  4  const  1   


--------------------------------------------------------------------------------

Query: SELECT findword,replaceword FROM replacement WHERE replacementsetid IN(-1,'14') ORDER BY replacementsetid DESC,replacementid DESC
Time before: 20.499752998352
Time after:  20.501306056976

table type possible_keys key key_len ref rows Extra
replacement  ALL  replacementsetid        120  where used; Using filesort 


--------------------------------------------------------------------------------

Page generated in 20.499583959579 seconds with 33 queries,
spending 0.098888039588928 doing MySQL queries and 20.400695919991 doing PHP things.
Query: UPDATE session SET lastactivity=1055272282,location='/myvbindex/index.php?explain=1',styleid=11 WHERE sessionhash='c7402ff04c96a36383b780512e15ad35' Time before: 20.525825977325 Time after: 20.526376008987
--------------------------------------------------------------------------------
Query: UPDATE user SET lastactivity=1055272282,inforum='0' WHERE userid='1' Time before: 20.526528000832 Time after: 20.526996970177

Its taking anywhere between 20-30 seconds to produce the main page for some reason today. It pauses in the weather area as you can see above. Is this due to a really bad connection problem to the website providing the weather? Nothing else has changed really and it used to be very quick.

Thx. for any advice.


Update

I've just turned off the weather display and the page loads fine. So I guess it must be down to the website providing the weather. As this is out of our control and would produce a timeout after 30 seconds for php execution, would it be possible to incorporate some sort of time limit on display of the weather and if it doesn't display in that time then don't display it? Otherwise we're all at the mercy of an independently run site.

ivanmcp 06-11-2003 04:58 PM

Thanx scotty :)

Skipsoutdoors 06-11-2003 10:14 PM

I inserted the code as per the previous post. Still I need some more help.

I didn't manage to make the options to turn it off and on show up in the Admin panel. Any suggestions as to what I did wrong?

Skip

Tigga 06-11-2003 10:40 PM

Intex - Unfortunatly that's something that can happen when the server that provides the weather is down. I'm planning on re-writing that part of the hack to work a slightly different way which won't require the updates as much, but with vB3 being released on Friday I'm not sure when I'll have the time to do that.

Skipsoutdoors - Did you run the queries in those instructions through phpMyAdmin. If you did that there's no reason I can think of that the options shouldn't show up...

Yuber 06-12-2003 07:03 PM

Any ideas yet Tigga on how to get to show announcements?

WitchyT 06-12-2003 09:55 PM

Just letting you know the log out thing works wonderfully now. Thanks. One other question, though.

In the news forum, within a thread I posted, this image -> http://www.smallville-torch.com/foru...es/yw/cool.gif looks fine within that thread. But when you view it in the main index it shows it as: http://smallville-torch.com/images/smilies/yw/cool.gif

Goat Boy 06-13-2003 01:31 AM

Quote:

05-20-03 at 06:10 PM Tigga said this in Post #1263
Was this the hack you used to allow mods to see invisible users? I didn't see anything in the code for that hack that could affect anything... Did you double check that your moderator usergroup still has an id of 5?

The only time the moderate will show up bold on Portal is when I change him to Super Moderator status, in the forums he shows up bold when he is in Moderator status.

and yes that is the hack I used above to view invisable users.

csidlernet 06-13-2003 07:06 AM

If you want i can help importing/translating/converting it to vb3..

Intex 06-13-2003 07:40 AM

Thx for the confirmation anyway Tigga :).


Quote:

Yesterday at 12:40 AM Tigga said this in Post #1382
Intex - Unfortunatly that's something that can happen when the server that provides the weather is down. I'm planning on re-writing that part of the hack to work a slightly different way which won't require the updates as much, but with vB3 being released on Friday I'm not sure when I'll have the time to do that.

Skipsoutdoors - Did you run the queries in those instructions through phpMyAdmin. If you did that there's no reason I can think of that the options shouldn't show up...


csidlernet 06-13-2003 07:42 AM

Intex you could propably try and obtain a copy of the weather program the site uses and upload it to your own server and run it.. I may be able to get it up and give you guys the file modifications so it can link to it on my server that way it has fast download times (server has 100mbps connection)

Exero 06-13-2003 09:08 AM

i get this error when i go to my forums dir..


Database error in vBulletin:

Invalid SQL: SELECT userid,username
FROM user
WHERE userid<>
AND (usergroupid=5
OR usergroupid=6
OR usergroupid=7
OR usergroupid=2)
ORDER BY RAND()
LIMIT 1
mysql error: You have an error in your SQL syntax near 'AND (usergroupid=5
OR usergroupid=6
' at line 4

mysql error number: 1064

Date: Friday 13th of June 2003 08:04:21 PM
Script: http://localhost/myvbindex/forum/myv...rum/index.php?
Referer:

DigitalDesktops 06-14-2003 12:28 PM

Guys, I need help with this.

I have done all the install instructions but when I go to view the portal I get:

Quote:

Warning: chdir(): No such file or directory (errno 2) in /home/virtual/site44/fst/var/www/html/index.php on line 8

Warning: main(./global.php): failed to open stream: No such file or directory in /home/virtual/site44/fst/var/www/html/index.php on line 19
in the PHP file the lines it is reffering to look like this:
Quote:

chdir('/home/virtual/site44/fst/var/www/html/forums/ ');

// No Further Editing Necessary

$templatesused = 'index,index_header,index_footer,headinclude,index _welcometext,index_logincode,index_buddy,index_bud dylist,index_buddypmlink,forumhome_loggedinuser,in dex_online,index_search,index_welcometext_avatar,i ndex_calendar,index_calendar_todaysevents,index_we ather,index_custom1,index_custom2,index_stats,inde x_birthdaybits,index_threadbit,';
$templatesused .= 'index_newsbits,index_news_adminopts,index_news_co mments,index_news_commentnull,index_news_readmore, index_newsbits_rating,index_newsbits_signature,ind ex_newsbits_avatar,index_newsbits_sendtofriend,ind ex_newsbits_printable,showthread_ratingdisplay,';
$templatesused .= 'index_pollresult,index_polloption_multiple,index_ polloption,index_polloptions,index_pollresults_vot ed,index_pollresults_closed,index_pollreview,index _pollresults,index_polldiscuss,index_polledit,';

$loadmaxusers = '1';
$loadbirthdays = '1';

require('./global.php');

Tigga 06-14-2003 04:55 PM

Yuber - I'll try to get to that as soon as I can. With the release of vB3 though I'm going to be very busy trying to get everything on my site to work with it.

WitchyT - Did you change the url of each of your smilies to the full url (ex /forum/images/smilies) as instructed in the readme file?

Goat Boy - The code for the online users bit is pretty much the same as the code in your forum/index.php, so they should behave in the same way. What is the usergroup id of your moderators group?

csidlernet - Thanks for the offer, but I'm pretty much finished with the vB3 version of this hack. I still have a couple of things to do, but it is finished for the most part.

Intex - No problem. I should be able to start working on the new method to pull the weather info for the vB3 version of this hack soon, so I should be able to port it over for a final release of the vB2 version. ;)

Exero - That wouldn't be anything to do with this script. It looks like it's having a problem trying to select a random user on your forum's homepage.

DigitalDesktops - Try removing the final trailing slash from the path to your forums. ;)

ivanmcp 06-14-2003 09:48 PM

Quote:

I'm pretty much finished with the vB3 version of this hack. I still have a couple of things to do, but it is finished for the most part.
Tigga means business!!! :confused:

XtReMaTriX 06-15-2003 12:31 AM

Hey Tigga, I just setup the new version 3.2.2 and i dont see any difference from 3.1

The page doesnt load any faster. Is there some other things that I am not seeing?

Here are the two URLs:
http://www.xtremods.com/index.php (3.1)
http://www.xtremods.com/myvbindex.php (3.2.2)

I have it so it tells you how fast the page wasgenerated at the bottom...

The page actally uses an extra query and takes longer to load...

BTW, this is a great hack and you have done a great job...! I am just wondering if i am missing something...

Thanks!

Kyle_TX 06-15-2003 12:47 AM

Quote:

csidlernet - Thanks for the offer, but I'm pretty much finished with the vB3 version of this hack. I still have a couple of things to do, but it is finished for the most part.
Any chance we can get a sneak peak of the vb3 version of this hack? not, official, of course :)

Lacrosse Boy 06-15-2003 01:41 AM

Quote:

Today at 12:55 PM Tigga said this in Post #1391
Thanks for the offer, but I'm pretty much finished with the vB3 version of this hack. I still have a couple of things to do, but it is finished for the most part.
I don't want to sound rude or mean or anything, it's not meant this way at all. I am just wondering when the version for vB3 will be out, and since VB3 hacks will not be posted yet, will you upload it somewhere else until they are allowed?

I am wondering because my site is a business site, and the slowest time of the year is during the summer, so I want to be able to do this all in the upcoming few weeks, or ASAP to have the site down for as little time as possible (some people will still be checking it out for next year's registration, etc.)

Just curious. :)

Tigga 06-15-2003 04:04 AM

XtReMaTriX - The 2 pages seemed to be loading at about the same speed for me, and both had 19 queries. The main change in the new version is the way forum permisions are done and people with larger forums (over 100,000 posts) are the ones that would notice the biggest difference. The pages do seem to be loading a little slow though, so if you'd like to put your server in debug mode, do an explain=1 on the page, and post the results here I'll be glad to take a look and see if anything can be done to speed it up.

Kyle_TX - So far the new version is pretty much the same as the old one, except it will use less queries (thanks to vB3 and some of it's features ;)) and less templates since I'll be taking full advantage of the new "if conditions". I'm not sure how many more options I will add to the first vB3 version... It's going to be quite a bit of work for me to upgrade my entire site to work with vB3, so the first version will most likely be the same as the current one for vB2 until I have time to add new features.

Lacrosse Boy - I know a few people will be waiting on this before they can upgrade their boards (I'm in the same boat, but with a lot more than an index page to recode :p) so I'm planning on asking one of the mods if it would be ok to email or PM the script to others per request once it's finished.

XtReMaTriX 06-15-2003 04:16 AM

Thanks Tagga, I will give it a shot, have never used Debug Mode so I will have to try and figure it out...

Tigga 06-15-2003 04:20 AM

Just add
$debug='1';
Right before the ?> at the end of your admin/config.php file. Then go to the url http://www.xtremods.com/myvbindex.php?explain=1 and that will list all the queries and how long each one took. ;)

XtReMaTriX 06-15-2003 04:25 AM

Here are the results to the debug mode... (had to zip up the HTML file...)

Thanks again!

Tigga 06-15-2003 06:02 PM

Check your PMs. :)


All times are GMT. The time now is 12:19 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.02480 seconds
  • Memory Usage 1,865KB
  • 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
  • (3)bbcode_php_printable
  • (9)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