vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   How to create your own vBulletin-powered page! (uses vB templates) (https://vborg.vbsupport.ru/showthread.php?t=62164)

attroll 03-08-2004 01:17 PM

Quote:

Originally Posted by Gary W
1. already is there

Gary W

If it is already there then why can't I see it? I see no navbar or anywhere where there is an option for a printable version. I did one of your mods and it did not show up. Here is the mod I did:

http://www.whiteblaze.net/forum/2004.php?

Gary King 03-08-2004 06:39 PM

Quote:

Originally Posted by exasko
so if i create it in notepad and save it as test that will work?

Nope you have to make a new template by using the Template Manager in admin cp :)

Gary King 03-08-2004 06:41 PM

Quote:

Originally Posted by attroll
Gary W

If it is already there then why can't I see it? I see no navbar or anywhere where there is an option for a printable version. I did one of your mods and it did not show up. Here is the mod I did:

http://www.whiteblaze.net/forum/2004.php?

*sigh* please don't bash hacks unless they truly don't work and it wasn't the installer's fault :)

Take a look at this screenshot, that's how it should look: https://vborg.vbsupport.ru/attachmen...chmentid=17205

Also, I never said I had included a printable version now did I? :)

Boofo 03-08-2004 07:56 PM

Quote:

Originally Posted by Gary W
Who's Online Modification

Now if you want to show who is browsing this new page of yours, just open up online.php and find:

You might want to change the file they should edit to /includes/functions_online.php instead of online.php. ;)

Gary King 03-08-2004 11:05 PM

Quote:

Originally Posted by Boofo
You might want to change the file they should edit to /includes/functions_online.php instead of online.php. ;)

Fixed now.

Boofo 03-08-2004 11:31 PM

You're welcome. ;)

attroll 03-09-2004 01:56 AM

Bump

Osterling 03-09-2004 03:13 PM

greak hack got it working! only question.. is there a way to make it so when some one searches the forum, the pages i made are searched too?

Zachariah 03-09-2004 03:40 PM

I was trying to add this to the php file and show up in the "TEST" template.

Can anyone could give me a hand on how to make it VB3 friendly. :cross-eyed:

PHP Code:

<?

$contribreport=mysql_query("SELECT userid,username,contrib FROM user WHERE contrib='1' ORDER BY userid");
while(list($userid,$username,$contrib)=mysql_fetch_row($contribreport)){

?>

<table border='0' cellspacing='1' cellpadding='0' align='center'>
  <tr>
  <td align='center' width='100%'><a target='_blank' href='../forums/member.php?u=<? echo"$userid"; ?>'><font size='1' face='Verdana'><? echo" $username"; ?></font></a></td>
 </tr>

<?
}
?>
</tr></td>
</td>
  </tr>

</table>


Gary King 03-09-2004 06:53 PM

Quote:

Originally Posted by exasko
greak hack got it working! only question.. is there a way to make it so when some one searches the forum, the pages i made are searched too?

No because search function only searches threads and posts anyways.

Gary King 03-09-2004 06:55 PM

Quote:

Originally Posted by HarryButt
I was trying to add this to the php file and show up in the "TEST" template.

Can anyone could give me a hand on how to make it VB3 friendly. :cross-eyed:

PHP Code:

<?

$contribreport=mysql_query("SELECT userid,username,contrib FROM user WHERE contrib='1' ORDER BY userid");
while(list($userid,$username,$contrib)=mysql_fetch_row($contribreport)){

?>

<table border='0' cellspacing='1' cellpadding='0' align='center'>
  <tr>
  <td align='center' width='100%'><a target='_blank' href='../forums/member.php?u=<? echo"$userid"; ?>'><font size='1' face='Verdana'><? echo" $username"; ?></font></a></td>
 </tr>

<?
}
?>
</tr></td>
</td>
  </tr>

</table>


PHP code goes in the file before outputting the TEST template, and HTML goes into the temlpate :)

Alien 03-09-2004 07:07 PM

Very nice job on this, I finally got around to adding all the miscellaneous forum policies and a few subpages and this was just what the doctor ordered to accomplish it!

Thanks a lot!

b6gm6n 03-09-2004 08:59 PM

Gary, looks like a great mod... i have a question though

Would it be possible to call an external html page to be included within instead of using templates?

glo 03-09-2004 09:03 PM

Is there anything like this for vB2.3.X?

Gary King 03-09-2004 09:03 PM

Quote:

Originally Posted by b6gm6n
Gary, looks like a great mod... i have a question though

Would it be possible to call an external html page to be included within instead of using templates?

Well then there wouldn't be a header or footer, so no point in using this mod then :) I'd suggest copying the HTML and placing into the body of my template :)

glo 03-11-2004 03:22 AM

Quote:

Originally Posted by glo
Is there anything like this for vB2.3.X?

Is this like Logicians Template hack?

TCSoul 03-12-2004 08:09 PM

Alright... vB newbie here, and this question is so basic, it almost makes me feel dirty...

Quote:

Originally Posted by Gary W
Be sure to change 'TEST' to the actual template name, and change 'test' to the filename. Also, change 'Test Page' to whatever you want to show in the navbar, such as 'Viewing Member Profile' (just an example).

Now create the template, called TEST with the following content:
HTML Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
</head>
<body>
$header

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="tcat">Title</td>
</tr>
<tr>
        <td class="alt1">Text</td>
</tr>
</table>

$footer
</body>
</html>

All done :D
Now check it out by going to test.php ;)

Here's my (oh so humble :o ) question... I'm looking everywhere, and I'm very confused about templates, and the Template Manager. First of all, is the Template Manager the same thing as the Style Manager? And regardless of that, the above code doesn't look like somethign that would be dealt with in the Style Manager anyway... at least not anywhere I can find. Do I need to save this as a template file in my code source (can't find a place it would make sense for it to go), and if not, where would I drop it in in the Style Manager?

Gary King 03-12-2004 09:11 PM

Quote:

Originally Posted by TCSoul
Alright... vB newbie here, and this question is so basic, it almost makes me feel dirty...



Here's my (oh so humble :o ) question... I'm looking everywhere, and I'm very confused about templates, and the Template Manager. First of all, is the Template Manager the same thing as the Style Manager? And regardless of that, the above code doesn't look like somethign that would be dealt with in the Style Manager anyway... at least not anywhere I can find. Do I need to save this as a template file in my code source (can't find a place it would make sense for it to go), and if not, where would I drop it in in the Style Manager?

Style Manager manages several styles. Each style contains hundreds of templates :) Let me know if that doesn't help, but should at least set you off on the right foot!

Ravenheart 03-12-2004 09:24 PM

Style Manager > Click the drop down box > Edit templates :)

glo 03-13-2004 02:14 AM

Quote:

Originally Posted by glo
Is this like Logicians Template hack?


umm Gary, would you prefer me to PM these questions to you?

Zachery 03-13-2004 04:49 AM

Quote:

Originally Posted by glo
umm Gary, would you prefer me to PM these questions to you?

im suprised this thread has made it to 5 pages, this isnt even a hack... if you would like to learn you could try a link in my sig, also this could have bee much better done with a call to GENERIC_SHELL template using a second template ;)

gmarik 03-13-2004 06:04 AM

Who is online system new variables should be in ACP MySQL DB, not the PHP files, I think ... for quicker eiditing ...

Zachery 03-13-2004 06:27 AM

Quote:

Originally Posted by gmarik
Who is online system new variables should be in ACP MySQL DB, not the PHP files, I think ... for quicker eiditing ...

Actually you need to add a few new lines of code to make whos online recgonize where you are :)

Gary King 03-13-2004 12:58 PM

Quote:

Originally Posted by glo
umm Gary, would you prefer me to PM these questions to you?

Closest thing I can think of is this: https://vborg.vbsupport.ru/showthrea...threadid=36600

Kakarot 03-15-2004 12:40 AM

How would you get a straight HTML, non-vbulletin related page to show up on "Who's Online" on another forum (on the same server of course).

I'm assuming you must reference it to a PHP snippet of code that records Who's Online, but how would I go about doing it?

Gary King 03-15-2004 01:49 AM

Quote:

Originally Posted by Kakarot
How would you get a straight HTML, non-vbulletin related page to show up on "Who's Online" on another forum (on the same server of course).

I'm assuming you must reference it to a PHP snippet of code that records Who's Online, but how would I go about doing it?

Just type in <?php require_once('global.php'); ?> at the top of the file (global.php being the one in forum so change accordingly.)

attroll 03-15-2004 03:21 AM

Quote:

Originally Posted by Gary W
*sigh* please don't bash hacks unless they truly don't work and it wasn't the installer's fault :)

Take a look at this screenshot, that's how it should look: https://vborg.vbsupport.ru/attachmen...chmentid=17205

Also, I never said I had included a printable version now did I? :)

Gary W

I am sorry if it looked like I was bashing the hack. That was the furthest thing from my mind. I just can not get the navbar thing to work. I followed your instructions and paisted the php code into the correct files. But I can not get the navbar to work.

You can look at my file buy going to this link. There is no navbar. Could you give me some advice?
http://www.whiteblaze.net/forum/test.php

I guess there was a misunderstanding about the printable version because in the previous post I asked two questions and your response was "already is there". So I asumed that was the answer to both questions. So I guess that was my bust?

https://vborg.vbsupport.ru/showpost....9&postcount=40

attroll 03-15-2004 03:29 AM

Gary W

I found out what happened. It was my fault that the navbar was not showing up. I deleted ths $navbar in the template by mistake. I am sorry about the misunderstanding.

But I would still like to see a option for a prinatble version added if it is possible.

Marulatree 03-15-2004 02:03 PM

I just get a blank page;

I have put the test.php file in my forum root e.g. /forum/test.php

And I have created the template...

All I get is a blank page...???

Gary King 03-15-2004 02:41 PM

Quote:

Originally Posted by Marulatree
I just get a blank page;

I have put the test.php file in my forum root e.g. /forum/test.php

And I have created the template...

All I get is a blank page...???

What's the template name? Use UPPERCASE not lowercase.

phenomenon 03-19-2004 11:45 PM

I'm intrigued by this. I keep coming back to it, wondering if this is something that could be combined with Coppermine or with 4images to get the gallery integrated with the forum. I'm currently running 4images; it allows me to login etc. but logs me out as soon as someone else looks at the forum or the gallery. Drives me nuts. I'd like it to have the navbar across the top, but replace the search functionality with the gallery search (which I've done already once before I scrapped and started over -- basically built a search that looks like vbulletins but calls 4images code)

That gallery is installed into a different directory, but I see you've got the code here for the diff directory.

There is a hack that unfortunately no one is paying attention to anymore here that linked the user login/cp of vb3 to the 4images... so now what I'm curious about is getting basically this to work the other way around -- make the login/etc. work with the gallery.

Hmm... I suppose if I were to copy all the 4images html into these templates it may work.

SilverDawn 03-20-2004 06:43 PM

great! I have been looking to get my custom pages to display correctly on who's online!

Thanks!

AshAbed 03-20-2004 11:01 PM

is it possible to make it so test.php?page=xxx works? thanks

Gary King 03-20-2004 11:10 PM

Quote:

Originally Posted by AshAbed
is it possible to make it so test.php?page=xxx works? thanks

Yes it's possible but it would be harder to explain and to make it work properly; why not just create a new file? :)

Grendel 03-21-2004 05:00 PM

I try to put the "whats-going-on"-content of the forumhome-template into a custom template. Works fine - besides the "calender events". Is there any way to put the events on an "vBulletin-powered page"?

Greetings
Grendel

Gary King 03-21-2004 05:20 PM

You'd have to copy the code in the file to produce the results for that; easiest thing to do would be to copy all of the contents of the index.php but remove the print_output() line.

Grendel 03-21-2004 05:33 PM

That's what I had done.
It shows the statistics, online-users and birthdays. But the events are not shown :(.

Grendel 03-21-2004 06:37 PM

Is there any chance to get the "Quick-Links" of the navbar running on "vBulletin-powered pages"? That would be nice.

Sorry, my fault. forgot the $navbar.
But the other problem exists nevertheless. ;)

Gary King 03-21-2004 10:58 PM

Quote:

Originally Posted by Grendel
Is there any chance to get the "Quick-Links" of the navbar running on "vBulletin-powered pages"? That would be nice.

Sorry, my fault. forgot the $navbar.
But the other problem exists nevertheless. ;)

Well I haven't looked into how the code creates the events data, but I suppose it would require more than index.php then. I will look into it when I have time, or maybe someone else could give it a go :)

AshAbed 03-21-2004 11:02 PM

Quote:

Originally Posted by Gary W
Yes it's possible but it would be harder to explain and to make it work properly; why not just create a new file? :)

I was using vBadvanced and had 100+ pages running through it, they're all saved as index_(pagename), I was hoping to be able to do this without making a page for each and keeping them named as index_pagename


All times are GMT. The time now is 11:32 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.07227 seconds
  • Memory Usage 1,845KB
  • 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_html_printable
  • (2)bbcode_php_printable
  • (21)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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