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)

Tigga 02-20-2003 12:14 AM

Actually, I didn't think about that... If it would be easier for you, you can put your server in dubug mode (Just add the code $debug="1"; at the bottom of your admin/config.php file, right before the ?>). Upload that file and then you'll see your Global template set when your edit your templates. Add the templates to that set and it will work that way too. Oh, and don't forget to take your board out of debug mode after you finish since it can be a security risk. ;)

Yuber 02-20-2003 01:11 AM

Quote:

Originally posted by PlurPlanet
arracing - Ok, this should work for you... I have 2 files attached here (one in this post, one in the next... sorry, I'm being lazy and doing it this way rather than zipping them ;)) that should help allow you to turn myvbindex into more of a portal rather than just a homepage script. Since the only things you'll be using for the left side of the page are the poll, custom templates, and search, those are the only parts I put in the "portal" part. If you ever decide you need to add something else to that side let me know and I can tell you how to change it.
Now for the instructions... First open the include.php file attached here. Change the path in the chdir part to point to your forums (just as you did with the myvbindex.php file when you first installed it). Then upload both the include.php and myvbindex.php files to the root folder on your server and after they are uploaded you can check the myvbindex.php page to be sure it still loads right. Then you will want to create a new template called include with the following content:
PHP Code:

$index_header

<table width="100%" cellspacing="10"><tr align="left" valign="top"><td width="165">

$custom1

$search

$custom2

$currentpoll

</td><td valign="top"

Then you would want to create another new template for the content of the page. It can be called whatever you would like. You would place the following content in the template (or at least something like this):
PHP Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<
html>
<
head>
<!-- 
no cache headers -->
<
meta http-equiv="Pragma" content="no-cache">
<
meta http-equiv="no-cache">
<
meta http-equiv="Expires" content="-1">
<
meta http-equiv="Cache-Control" content="no-cache">
<!-- 
end no cache headers -->
<
META NAME="title" CONTENT="$hometitle">
<
META NAME="keywords" CONTENT="">
<
META NAME="description" CONTENT="">

<
TITLE>$hometitle</TITLE>
$headinclude
</head>
<
body>
$include

<-- YOUR CONTENT GOES HERE -->

</
td></tr></table>

$index_footer

</body></html

Obviously replace the <-- YOUR CONTENT GOES HERE --> part with the html code for the content of that page.

Now for the last part, which is actually getting that template to display. You want to create a new file... It can be called whatever you would like, but must have a .php extension. The content of the file should be something like this:
PHP Code:

<?php

$templatesused 
.= 'testpage,';

require(
"./include.php");

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

?>

The only things in that need to be changed are the 2 places you see "testpage". This should be changed to whatever the name of the template you just created is. Change that, upload the file, and it should work just fine. One thing to note... In the first part where you see $templatesused, make sure there is always a comma after the template since there will be more templates called from the include.php file. Also, one nice thing is that you will be able to use replacements in your new templates, and these pages will change to reflect the style a user has selected if you use the replacement tags for the colors and such. And of course to create other pages like this, you would just create a new template and new page, and change then put the name of the template in the 2 places for that page.
Well that should be everything you need to do. If you have any questions or problems let me know. :)

How would I do that if I want the login, and the weather on the left side as well?

Tigga 02-20-2003 01:27 AM

You would use the same files I posted above, but you would have to remove some code from the myvbindex file and place it in the include file...
First, in myvbindex.php you would need to find:
// Show Avatar

You would highlight everything below that, up to:
// Online Users
(about 45 lines of code)

Remove that from the myvbindex.php file, and paste it in the include.php file right before:
// Current Poll

Then you would find:
// Weather - by JJR512

Highlight everything below that up to:
// Search Box

Remove that and paste it in your include.php file right under the last code you added.

arracing 02-20-2003 02:09 AM

Quote:

Originally posted by PlurPlanet
Actually, I didn't think about that... If it would be easier for you, you can put your server in dubug mode (Just add the code $debug="1"; at the bottom of your admin/config.php file, right before the ?>). Upload that file and then you'll see your Global template set when your edit your templates. Add the templates to that set and it will work that way too. Oh, and don't forget to take your board out of debug mode after you finish since it can be a security risk. ;)
Ur the man!!! And this site rockz too!!

arracing 02-20-2003 05:46 AM

okay i just noticed this. In my lateste post table. where its supposed to say the last poster. it doenst show up. This happened after i uploaded the new myvbindex.php file. I went and looked at the old one before the new upload and copied the whole latest post section to the new one and still nothing shows up. Whats going on?

http://www.ar-racing.com/myvbindex.php

arracing 02-20-2003 06:46 AM

what i did to try and solve this was use my old myvbindex file instead of the one you gave me. It worked with the old one. I was trying to compare the 2 files and the old one doesnt require the include file but the new one does. However everything is still working using the old file. So what is your new myvbindex file doing and why is it calling that include file. Whats the include file doing?

If you go to my site now its using the old myvbindex so thats why the last poster is working. But im trying to understand why you made me upload those 2 files if everything is working fine with the old one. I must be missing something.

Tigga 02-20-2003 01:36 PM

That's wierd... You are using myvbindex 3.1, right? The only difference between your old myvbindex and new one shoud be that it uses the require tag to also pull the info from include.php, and some of the features (search, custom tempates, & poll) were moved to the include file instead. It's a little better to do things that way incase you ever change it, but otherwise there wouldn't be anything wrong with using your original myvbindex file for your index page, and then the include file with your new pages.

Littlebit 02-20-2003 02:10 PM

Hi Plurplanet,
From my index.php, I ran across a 404 error from the pop up to take me to a new pm message. The link, for some reason, is mysite.com/private.php?s=
and leaving out my forums directory in the bburl.
I can't figure it out.

Tigga 02-20-2003 02:35 PM

I could have swore I put the instructions to edit that in the install file, but I guess not. Sorry about that...
You can fix it by editing your head_newpm template and looking for 2 places that you'll see private.php. Just add /fourms/ (or whatever your forum folder is called) in front of that and it should fix the problem.
By the way, I haven't forgotten about your PM. I've just been really busy this week and haven't had a chance to look into those problems you asked me about yet. I'll try to look at those for you before the weekend though. :)

Yuber 02-20-2003 03:06 PM

Thanks a lot Plur, i'll try it out tonight and tell you how it works and/or if I have a probs.


All times are GMT. The time now is 12:28 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.05904 seconds
  • Memory Usage 1,766KB
  • 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
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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