vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Create your own vBulletin page (https://vborg.vbsupport.ru/showthread.php?t=228112)

cory_booth 01-03-2010 03:07 AM

I saw earlier instructions to take care of the WOL (Who's Online Location) display. It required editing a few standard VB files.
Seeing examples from plugins I thought I'd remention it here:

Create a plugin called XXXX WOL Process
Place it on the hook called: online_location_process
Insert the following code (edited to your needs)

PHP Code:

if ($filename == 'xxx.php')
$userinfo['activity'] = 'xxx'

Then create another plugin called XXX WOL Display
Place it on the hook called: online_location_unkown
Insert the following code (edited to your needs)

PHP Code:

if ($userinfo['activity'] == 'xxx'

$userinfo['where'] = "<a href='./xxx.php'>The link displayed</a>"
$userinfo['action'] = "What is displayed"
$handled true


Ofcourse in this plugin code, you can copy and paste over and over to cover the extra pages you have created.

All this does is:
1st, sets the "user activity" value based on the actual php file name.
2nd, when the WOL location is "unknown" then the script checks your custom php settings and if found - sets the user location display value and a link to the actual page.

Lynne 01-03-2010 03:36 AM

Quote:

Originally Posted by SuperGLS (Post 1945469)
Right now I have it running exactly how it is. See here.

http://www.elantraxd.com/forums/cotm.php

The template works great and it seems ok, but whenever I try to add anything to the ###add your custom code### section of that PHP file I throw errors.

Maybe this isn't the right thing for me. I don't need to add php stuff I guess, just HTML code, but I figured that would still be possible. Guess not? If not that's ok too, I can jump on another solution. Basically I want it to look like this:

http://www.elantraxd.com/forums/misc...&template=cotm

If you don't want any code, then that's fine. You could just add all html to the template and create a page with the url cotm.php. That's just fine.

cellarius 01-03-2010 05:49 AM

Quote:

Originally Posted by SuperGLS (Post 1945469)
I know you can change the template, but I don't need to change anything in it, right?

That depends on what you want to achieve :)

Quote:

From what you are saying here I understand now I'm supposed to have just one template and one php file (the one included above that will include all of my custom code).
That also depends. If the site you linked below is static (=plain html), you don't need any php code and all html code goes into the template.

Quote:

The template works great and it seems ok, but whenever I try to add anything to the ###add your custom code### section of that PHP file I throw errors.
It would be helpful for us to help if you simply would show us what you try to add.

Quote:

Maybe this isn't the right thing for me. I don't need to add php stuff I guess, just HTML code, but I figured that would still be possible. Guess not? If not that's ok too, I can jump on another solution.
As I said: php code goes into the php file, html code into the template. If you just dump html into the php file (as I suspect you did), you'll get errors.

Quote:

I just found this HOW TO guide from Lynne after I used a different HOW TO guide to make that above. The reason I wanted to use this one from Lynne is because the URL would be a lot better.
You can easily do everything you can do with that other method what using this one, including what you want.

Quote:

So, am I out of luck or what? Thanks a great deal for any help!
Just show us the code you try to use, so we have something to talk about.

SuperGLS 01-03-2010 12:00 PM

Ahhhhhhh! The HTML goes in the template (which is obvious now considering that's how I did it in the other HOW TO guide). Thanks to you both!

Now www.elantraxd.com/forums/cotm.php is working great! I just have to redo the HTML so it doesn't look so bad. Actually, one further question, if I want to set up this page using <div> codes and such instead of the outdated <table> codes where would I need to put any of the CSS info associated with that stuff?

Thanks again!!!

Lynne 01-03-2010 02:27 PM

CSS goes in the <head> If you are using CSS that is already defined (like the same CSS used on the index.php page) but not included in the headinclude template (like forumbits.css), then you can just include that same CSS template into your page:
PHP Code:

<link rel="stylesheet" type="text/css" href="{vb:var vbcsspath}css.php?sheet=forumbits.css" /> 


Allan 01-03-2010 02:34 PM

How add others pages 'within' current vBulletin files ?

as in this example: https://vborg.vbsupport.ru/showthread.php?t=62164

SuperGLS 01-03-2010 02:51 PM

Thanks Lynne. I have much learning to do about CSS before I start down that path, thanks though.

Allan 01-03-2010 08:01 PM

Quote:

Originally Posted by Allan (Post 1945997)
How add others pages 'within' current vBulletin files ?

as in this example: https://vborg.vbsupport.ru/showthread.php?t=62164

Little dump ^^

SuperGLS 01-04-2010 01:33 AM

Quote:

Originally Posted by cory_booth (Post 1945561)
I saw earlier instructions to take care of the WOL (Who's Online Location) display. It required editing a few standard VB files.
Seeing examples from plugins I thought I'd remention it here:

Create a plugin called XXXX WOL Process
Place it on the hook called: online_location_process
Insert the following code (edited to your needs)

PHP Code:

if ($filename == 'xxx.php') <<<<<I changed this to 'extras.php'
$userinfo['activity'] = 'xxx'; <<<<<I changed this to 'extras' 

Then create another plugin called XXX WOL Display
Place it on the hook called: online_location_unkown
Insert the following code (edited to your needs)

PHP Code:

if ($userinfo['activity'] == 'xxx')  <<<<I changed this to 'extras'

$userinfo['where'] = "<a href='./xxx.php'>The link displayed</a>";  <<<<<I changed this to  <a href='./extras.php'>Extras</a>
$userinfo['action'] = "What is displayed"
$handled true


Ofcourse in this plugin code, you can copy and paste over and over to cover the extra pages you have created.

All this does is:
1st, sets the "user activity" value based on the actual php file name.
2nd, when the WOL location is "unknown" then the script checks your custom php settings and if found - sets the user location display value and a link to the actual page.

Cory, can you give any examples of what we should replace here? I've replaced what I think should be replaced but I still get the Unknown Location message. Take a look.

https://vborg.vbsupport.ru/external/2010/01/67.png

Thanks in advance.

Lynne 01-04-2010 02:28 AM

I do my WOL a little different and just added the code to the first post.

Verionia 01-04-2010 04:31 AM

Quote:

Originally Posted by Anseur (Post 1918381)
I've set this up on my test site, and it works OK while i'm logged in, but when I'm not logged in, and I visit this custom page, I just get a plain white screen.

looking at a source of this plain white pages shows me:
Code:

<!-- BEGIN TEMPLATE: dkp_template -->
 
<!-- END TEMPLATE: dkp_template -->

Here is the code currently used in the template for this custom .php page:

Code:

{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
  <head>
    <title>{vb:raw vboptions.bbtitle}</title>
    {vb:raw headinclude}
  </head>
  <body>
   
    {vb:raw header}
   
    {vb:raw navbar}
   
    <div id="pagetitle">
      <h1>{vb:raw pagetitle}</h1>
    </div>
  <li class="popupmenu">
    <h2 class="blockhead">The MCO DKP System</h2>
    <h2 class="blocksubhead"> <vb:if condition="$show['modcplink']">
                                <a href="javascript://" class="popupctrl">Administration</a>
                                <ul class="popupbody popuphover">
                                        <li><a href="/25manwrathplus/admin/" target=?dkp_frame?>Admin Index</a></li>
                                        <li><a href="sublink2.php">SubLink 2</a></li>
                                        <li><a href="sublink3.php">SubLink 3</a></li>
                                </ul>
                            </li>
</vb:if> </h2>
                         
    <div class="blockbody">
      <div {height:auto;}>

<iframe name="dkp_frame" width=100% height=1700px SCROLLING=no FRAMEBORDER=0 src="/25manwrathplus">dkp_frame</iframe>
               
      </div>
    </div>
   
    {vb:raw footer}
  </body>
</html>


How can I get the page to auto size the website in the frames so that I don't have to use scrolling or parts of the website is cut off?

SuperGLS 01-04-2010 11:03 PM

Quote:

Originally Posted by Lynne (Post 1946585)
I do my WOL a little different and just added the code to the first post.

That worked great (and thanks for color coding it for us, that's perfect). Thanks yet again Lynne.

RDX1 01-05-2010 04:16 AM

Great article, only issue is notices are showing up with no way to dismiss them, also the login box shows and won't go away even when logged in. Any idea how to remove this?

Lynne 01-05-2010 02:46 PM

Quote:

Originally Posted by RDX1 (Post 1947535)
Great article, only issue is notices are showing up with no way to dismiss them, also the login box shows and won't go away even when logged in. Any idea how to remove this?

Since those are both issues in the navbar and header which aren't touched in this article, I think it's an issue with the way you have your site set up.

pisymbol 01-11-2010 01:40 AM

Lynne, anyone, I have copied pasted the exact tutorial and I see nothing. First off, where should I see the results?

I have test.php in my $ROOTIDR (permissions are 755), I have TEST registered in my MASTER style with the exact code above. I understand fundamentally waht I'm doing here but I see no results.

How to I test this? I see no error in my error_logs.

Code:

<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################

define('THIS_SCRIPT', 'test');
define('CSRF_PROTECTION', true); 
// change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array('TEST',
);

// pre-cache templates used by specific actions
$actiontemplates = array();

// ######################### REQUIRE BACK-END ############################
// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line
require_once('./global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$navbits = construct_navbits(array('' => 'Test Page'));
$navbar = render_navbar_template($navbits);

// ###### YOUR CUSTOM CODE GOES HERE #####
$pagetitle = 'My Page Title';

// ###### NOW YOUR TEMPLATE IS BEING RENDERED ######

$templater = vB_Template::create('TEST');
$templater->register_page_templates();
$templater->register('navbar', $navbar);
$templater->register('pagetitle', $pagetitle);
print_output($templater->render());

?>

I created two plugins associated with the right hooks. The code is identical to what is shown on the first page.

The template is registered, if I customize/edit it:

Code:

{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
  <head>
    <title>{vb:raw vboptions.bbtitle} - {vb:raw pagetitle}</title>
    {vb:raw headinclude}
  </head>
  <body>
   
    {vb:raw header}
   
    {vb:raw navbar}
   
    <div id="pagetitle">
      <h1>{vb:raw pagetitle}</h1>
    </div>
   
    <h2 class="blockhead">Title</h2>
    <div class="blockbody">
      <div class="blockrow">
        Text
      </div>
    </div>
   
    {vb:raw footer}
  </body>
</html>

I am using latest 4.0 Gold PL1, php 5.3.0, apache 2.2.x (its installed on my local MBP (Snow Leopard)).

tafreeh 01-11-2010 07:45 PM

great article.. i was able to create the page... but my content doesnt support basic html tags .... why is that?????

mokujin 01-11-2010 08:17 PM

Does anyone how to disable all notices in custom page? Thank you

pisymbol 01-12-2010 01:05 AM

Alright, my code looks good but I have two questions:

1) To get to my test page I do:

http://localhost/test.php

I see my test page.

2) If I then go to WOL link, I see My Page underneath it. So that works though I guess I didn't understand the point of the test page.

However, I noticed that the link under WOL is:

http://localhost/test.php?

With no vbulletin session state passed to it. Is that right?

Lynne 01-12-2010 02:51 PM

There will not be a session state if you are logged in.

meissenation 01-12-2010 05:46 PM

Anyone know why
HTML Code:

<strong></strong> and <ul></ul><li></li>
tags do not work in the custom page? I've never seen HTML just be ignored like that. I can view it in the source code for the page so I know it's not my cache just not refreshing but yet it's not doing what the HTML tags say to do.

http://www.mifbody.com/vbulletin/advertise.php

If you view the source and then compare where it says "SOLD" in red - it should be strong. All the headings should be strong for that matter.


Edit:
Weird -
HTML Code:

<b></b>
works perfectly fine, though...

Lynne 01-12-2010 06:05 PM

Quote:

Originally Posted by meissenation (Post 1953744)
Anyone know why
HTML Code:

<strong></strong> and <ul></ul><li></li>
tags do not work in the custom page? I've never seen HTML just be ignored like that. I can view it in the source code for the page so I know it's not my cache just not refreshing but yet it's not doing what the HTML tags say to do.

http://www.mifbody.com/vbulletin/advertise.php

If you view the source and then compare where it says "SOLD" in red - it should be strong. All the headings should be strong for that matter.


Edit:
Weird -
HTML Code:

<b></b>
works perfectly fine, though...

View your css using something like firebug and you'll see that vb has added css that deals with those tags. If you don't like it, then modify it. You can add css to your own page to override the other.

glen290 01-12-2010 06:08 PM

Been trying to get this to work all day with no luck, just get a blank page every time, copied it exactly but no joy :mad:

meissenation 01-12-2010 06:13 PM

Quote:

Originally Posted by glen290 (Post 1953762)
Been trying to get this to work all day with no luck, just get a blank page every time, copied it exactly but no joy :mad:

I was getting a blank page too. This line has to be the EXACT name and case (upper case vs lower case) as your template name:
Code:

$templater = vB_Template::create('test');
For example - if your template is named TEST, you'll get a blank page.

psypher 01-12-2010 06:14 PM

Awesome job, works great for me.

glen290 01-12-2010 06:21 PM

Quote:

Originally Posted by meissenation (Post 1953765)
I was getting a blank page too. This line has to be the EXACT name and case (upper case vs lower case) as your template name:
Code:

$templater = vB_Template::create('test');
For example - if your template is named TEST, you'll get a blank page.


Checked that a few times and still the same, must be doing something wrong creating the template.

I went in to style manager / add new template and named it test then pasted in the info from the first page (2nd box) is this correct ?

meissenation 01-12-2010 06:30 PM

Quote:

Originally Posted by Lynne (Post 1953758)
View your css using something like firebug and you'll see that vb has added css that deals with those tags. If you don't like it, then modify it. You can add css to your own page to override the other.

Thanks for the info, Lynne. Lots of learning to do. I absolutely hate this CSS stuff... wish I could just disable it and go back to the old system where everything just worked and looked correct. Change the CSS in one thing and now you've completely ruined the look of something totally unrelated. What happened to the good old days when you could just put <strong> if you want it to be strong and use UL?! LOL Crazy. Way too overcomplicated.

Anyway - thanks for the info, Lynne. Guess I'll have to create my own CSS (yuck) just to be able to use strong and ordered lists...

PS - frustration directed at VB development team, not you Lynne.

Lynne 01-12-2010 08:05 PM

Quote:

Originally Posted by glen290 (Post 1953772)
Checked that a few times and still the same, must be doing something wrong creating the template.

I went in to style manager / add new template and named it test then pasted in the info from the first page (2nd box) is this correct ?

Make sure you added the template to the style you are using on your site.

Quote:

Originally Posted by meissenation (Post 1953783)
Thanks for the info, Lynne. Lots of learning to do. I absolutely hate this CSS stuff... wish I could just disable it and go back to the old system where everything just worked and looked correct. Change the CSS in one thing and now you've completely ruined the look of something totally unrelated. What happened to the good old days when you could just put <strong> if you want it to be strong and use UL?! LOL Crazy. Way too overcomplicated.

Anyway - thanks for the info, Lynne. Guess I'll have to create my own CSS (yuck) just to be able to use strong and ordered lists...

PS - frustration directed at VB development team, not you Lynne.

I just looked at your site. You aren't using your tags correctly. You need to go:
Code:

<ul>
<li>stuff</li>
<li>more stuff</li>
</ul>

You have <ul> tags all over in your list.

As for the css for strong, just add this in your custom css for the page:
HTML Code:

<style type="text/css">
strong {font-weight:bold;}
ul.unordered li {list-style-type: disc;list-style-position:inside;}
</style>

And then for your list:
HTML Code:

<ul class="unordered">
<li>stuff</li>
<li>more stuff</li>
</ul>


glen290 01-13-2010 10:35 AM

Quote:

Originally Posted by Lynne (Post 1953865)
Make sure you added the template to the style you are using on your site.


Only using the default style on my test board, still no joy..:( :(

meissenation 01-13-2010 11:54 AM

Quote:

Originally Posted by Lynne (Post 1953865)
Make sure you added the template to the style you are using on your site.


I just looked at your site. You aren't using your tags correctly. You need to go:
Code:

<ul>
<li>stuff</li>
<li>more stuff</li>
</ul>

You have <ul> tags all over in your list.

As for the css for strong, just add this in your custom css for the page:
HTML Code:

<style type="text/css">
strong {font-weight:bold;}
ul.unordered li {list-style-type: disc;list-style-position:inside;}
</style>

And then for your list:
HTML Code:

<ul class="unordered">
<li>stuff</li>
<li>more stuff</li>
</ul>


Lynne -

Thanks for your help, I sincerely appreciate it. The UL tags are being used correctly, though. I extracted just the content of the block and pasted it here:
HTML Code:

Advertising with the Michigan FBody Association is a sure fire way to get more customers to your local shop! What better way to get local customers interested in your products than to advertise them on a website that thousands of Michigan residents would see? Let's take a look at the features that each Sponsor gets!<br>
<br>
 
<b>Premier Package - $200 per Year</strong> - Ultimate Exposure! </b><b><font color="red">SOLD!</font></b>
<UL>
<LI>Premier Package = Ultimate in Company Exposure!</LI>
<UL>
<LI>This package is only available to ONE company at a time! With this package, you not only do you get everything that is offered in the "Gold" package, but your company will have sponsored <strong>FOUR</strong> trophies for the annual Spring Meet & Greet! That's right, each <b>1st Place</b> Generation-Specific trophy (1st Place - 1st Generation, 1st Place - 2nd Generation, etc) will be sponsored by your company with this package! Instant recognition for being a sponsor that helps make our Meet & Greet possible, your company's name will be mentioned throughout the course of the Meet & Greet and at the Awards ceremony!</LI>
</UL>
<LI>Banner on EVERY MiFbody.com Page</LI>
<UL>
<LI>Your banner will be displayed in the top right corner of every single page on MiFbody.com. Your banner will also rotate in the Horizontal Banner section as well as the Right Sponsor Bar section. That's right - your banner is guaranteed to be displayed once on every single page, and the potential for up to three different locations on the page! <b>Now that's some exclusive exposure!</b></LI>
</UL>
<LI>SubForum under the Sponsor Section</LI>
<UL>
<LI>The sub forum allows sponsors to post specific company information, deals, specials, new products, etc that you want to advertise.</LI>
</UL>
<LI>Right Sponsor Bar Banner</LI>
<UL>
<LI>A 100 pixel wide banner is displayed on the main vBulletin templates such as the Forum Home, Forum Display, and Show Thread templates. </LI>
</UL>
<LI>Horizontal Banner Section</LI>
<UL>
<LI>To ensure even more exposure, we've implemented a random rotating banner section that displays above the main content area. That way your company's banner will get maximum exposure on many pages that the average user navigates through. </LI>
</UL>
<LI>Banner Statistics (Upon request)</LI>
<UL>
<LI>Banner Impressions (times the banner is shown on the page) and Banner Clicks are logged by default. Upon request, we can pull up your impressions and clicks to let you know how well your banner is doing.</LI>
</UL>
<LI>Company Flier / Brochure</LI>
<UL>
<LI>At our annual Spring Meet & Greet, we will hand out a Sponsor-provided flier upon registration and check-in. This will get your product information into the hands of over 200 people! </LI>
</UL>
</UL>
<br>
 
<b>Platinum Package - $150 per Year</b> - Better Exposure!
<UL>
<LI>Two Sponsored Spring Meet & Greet Trophies!</LI>
<UL>
<LI>With the Gold "Plus" Package, your company will be sponsoring two Non-Generation specific trophies for our Annual Spring Meet & Greet! This will give you even more exposure than the Gold and Silver package! When we are holding the awards ceremony, your company's name will be mentioned as being the sponsor of the trophy! This is a great way to get recognition for your company.</LI>
</UL>
<LI>SubForum under the Sponsor Section</LI>
<UL>
<LI>The sub forum allows sponsors to post specific company information, deals, specials, new products, etc that you want to advertise.</LI>
</UL>
<LI>Right Sponsor Bar Banner</LI>
<UL>
<LI>A 100 pixel wide banner is displayed on the main vBulletin templates such as the Forum Home, Forum Display, and Show Thread templates. </LI>
</UL>
<LI>Horizontal Banner Section</LI>
<UL>
<LI>To ensure even more exposure, we've implemented a random rotating banner section that displays above the main content area. That way your company's banner will get maximum exposure on many pages that the average user navigates through. </LI>
</UL>
<LI>Banner Statistics (Upon request)</LI>
<UL>
<LI>Banner Impressions (times the banner is shown on the page) and Banner Clicks are logged by default. Upon request, we can pull up your impressions and clicks to let you know how well your banner is doing.</LI>
</UL>
<LI>Company Flier / Brochure</LI>
<UL>
<LI>At our annual Spring Meet & Greet, we will hand out a Sponsor-provided flier upon registration and check-in. This will get your product information into the hands of over 200 people! </LI>
</UL>
</UL>
<br>
 
<b>Gold Package - $100 per Year</b> - Good Exposure!
<UL>
<LI>SubForum under the Sponsor Section</LI>
<UL>
<LI>The sub forum allows sponsors to post specific company information, deals, specials, new products, etc that you want to advertise.</LI>
</UL>
<LI>Right Sponsor Bar Banner</LI>
<UL>
<LI>A 100 pixel wide banner is displayed on the main vBulletin templates such as the Forum Home, Forum Display, and Show Thread templates. </LI>
</UL>
<LI>Horizontal Banner Section</LI>
<UL>
<LI>To ensure even more exposure, we've implemented a random rotating banner section that displays above the main content area. That way your company's banner will get maximum exposure on many pages that the average user navigates through. </LI>
</UL>
<LI>Banner Statistics (Upon request)</LI>
<UL>
<LI>Banner Impressions (times the banner is shown on the page) and Banner Clicks are logged by default. Upon request, we can pull up your impressions and clicks to let you know how well your banner is doing.</LI>
</UL>
<LI>Company Flier / Brochure</LI>
<UL>
<LI>At our annual Spring Meet & Greet, we will hand out a Sponsor-provided flier upon registration and check-in. This will get your product information into the hands of over 200 people! </LI>
</UL>
</UL>
<br>
 
<b>Silver Package - $50 per Year</b>
<UL>
<LI>Right Sponsor Bar Banner</LI>
<UL>
<LI>A 100 pixel wide banner is displayed on the main vBulletin templates such as the Forum Home, Forum Display, and Show Thread templates. </LI>
</UL>
<LI>Banner Statistics (Upon request)</LI>
<UL>
<LI>Banner Impressions (times the banner is shown on the page) and Banner Clicks are logged by default. Upon request, we can pull up your impressions and clicks to let you know how well your banner is doing.</LI>
</UL>
<LI>Company Flier / Brochure</LI>
<UL>
<LI>At our annual Spring Meet & Greet, we will hand out a Sponsor-provided flier upon registration and check-in. This will get your product information into the hands of over 200 people!  </LI>
</UL>
</UL>
<br>
 
<b>Spring Meet & Greet Trophy Sponsorship - $30 / trophy</b><br>
Each year, we hold a Spring Meet & Greet car show. We have a number of trophies that are awarded to show winners and for a small price you can get recognition at our show too! For only $30 per trophy, you can sponsor one of the trophies at our Meet & Greet - when we get to awarding the trophy, your company's name will be announced to everyone at the show! Likewise, we will have a small flier that will be given out at registration/check-in that will thank all of the trophy sponsors and will give their company information - website, address, contact information. The people at our show know where to go to thank you by buying your products! <strong>Please note: the trophy sponsorship will be applied at the next possible car show. If you sponsor the trophy before this year's show, it will be applied to this year's show. Obviously, if you sponsor a trophy after our car show has already happened for the year, it will be applied to next year's show.</strong>
 
<br><br>
Want to know more information about advertising with the Michigan Fbody Association? Send an email to our advertising e-mail address and we will be in contact with you as soon as possible to discuss the packages in more detail.<br><br><center><a href="mailto:advertising@mifbody.com">Advertising Email Address</center>
</font>

If you copy and paste that into notepad and save it as an HTML it will work correctly - the UL tags that are all over the place are creating nested lists.

Lynne 01-13-2010 02:24 PM

Try this for your css:
Code:

<style type="text/css">
strong {font-weight:bold;}
ul.unordered li {list-style-type: disc;list-style-position:inside; display: list-item; margin-left: 2.5em; padding-left: 0;}

ul.unordered ul li {list-style-type: circle; display: list-item;margin-left: 2.5em; padding-left: 0;}
</style>

And you aren't nesting them correctly. The <li></li> needs to be around the nested list, ie:
HTML Code:

<LI>SubForum under the Sponsor Section
  <UL>
  <LI>The sub forum allows sponsors to post specific company information, deals, specials, new products, etc that you want to advertise.</LI>
  </UL>
</LI>


glen290 01-13-2010 03:36 PM

throwing in the towel, cant get no joy with this lol

TheSupportForum 01-13-2010 05:15 PM

i need help in doing the following but not sure how to

found a mod for 3.8 and need to update this error, i need to update this in either a plugin or template and need help

fetch_template() calls should be replaced by the vB_Template class

Lynne 01-13-2010 05:39 PM

Cellarius wrote a really good article that you may be interested in - [vB4] Rendering templates and registering variables - a short guide

TheSupportForum 01-13-2010 05:53 PM

Quote:

Originally Posted by Lynne (Post 1954680)
Cellarius wrote a really good article that you may be interested in - [vB4] Rendering templates and registering variables - a short guide

thx but this is for a php file and not a template i need to replace

eval('$tblreports_list .= "'.fetch_template in a template

Lynne 01-13-2010 06:31 PM

Quote:

Originally Posted by simonhind (Post 1954689)
thx but this is for a php file and not a template i need to replace

eval('$tblreports_list .= "'.fetch_template in a template

He explains what php code to use to render templates. You no longer use:
PHP Code:

eval('$mytemplate = "' fetch_template('mytemplate') . '";'); 

You now use something similar to:
PHP Code:

$templater vB_Template::create('mytemplate');
    
$templater->register('my_var'$my_var);
    
$templater->register('my_array'$my_array);
$templater->render(); 

It's all explained in that article.

pisymbol 01-13-2010 07:27 PM

Quote:

Originally Posted by Lynne (Post 1953595)
There will not be a session state if you are logged in.

Got it. Thanks. I think the article should put somewhere that you should go to:

http://<site url>/test.php

to verify. I was focused on the WOL hooks and got very confused about EXPECTED output (it was so obvious I didn't realize it).

Thanks!

tafreeh 01-13-2010 11:24 PM

since too many common html codes are not working...
i would like to know

which code should i use to break the line( change the link)
<p> </br> doesnt work

how do i break the line?

plus what code should i use for a list?

ul and li dont seem to work at all..

Please Advice.

Lynne 01-13-2010 11:54 PM

Quote:

Originally Posted by tafreeh (Post 1954979)
since too many common html codes are not working...
i would like to know

which code should i use to break the line( change the link)
<p> </br> doesnt work

how do i break the line?

plus what code should i use for a list?

ul and li dont seem to work at all..

Please Advice.

It's all just the way the css is set up by vBs in the css stylesheets. You can change it to be however you want by adding your own css, like I posted above for the lists.

Breaks work just fine. Your html is wrong... it's <br />.

PukkaBen 01-14-2010 11:18 AM

Worked great for me!! Cheers Lynne!! This How To is just awesome!!

Lynne 01-14-2010 04:33 PM

Quote:

Originally Posted by Allan (Post 1945997)
How add others pages 'within' current vBulletin files ?

as in this example: https://vborg.vbsupport.ru/showthread.php?t=62164

Sorry, I missed this. You would just do something like this...
PHP Code:

<?php

.......

// pre-cache templates used by all actions
$globaltemplates = array('TEST',
'TEST2',
'TEST3',
);

........
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$navbits construct_navbits(array('' => 'Test Page'));
$navbar render_navbar_template($navbits);

// ###### When do == 'xxx' #####
if ($_REQUEST['do'] == 'xxx')
{
$pagetitle 'My Page Title';

$templater vB_Template::create('TEST');
$templater->register_page_templates();
$templater->register('navbar'$navbar);
$templater->register('pagetitle'$pagetitle);
print_output($templater->render());
}

// ###### When do == 'yyy' #####
if ($_REQUEST['do'] == 'yyy')
{
$pagetitle 'My Page Title';

$templater vB_Template::create('TEST2');
$templater->register_page_templates();
$templater->register('navbar'$navbar);
$templater->register('pagetitle'$pagetitle);
print_output($templater->render());
}

// ###### When do does not equal 'xxx' or 'yyy' #####

$pagetitle 'My Page Title';

$templater vB_Template::create('TEST3');
$templater->register_page_templates();
$templater->register('navbar'$navbar);
$templater->register('pagetitle'$pagetitle);
print_output($templater->render());


?>

There are all sorts of different ways to do it, but that is one simple way.


All times are GMT. The time now is 12:04 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.02406 seconds
  • Memory Usage 1,980KB
  • 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
  • (9)bbcode_code_printable
  • (10)bbcode_html_printable
  • (8)bbcode_php_printable
  • (25)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