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)

MacroPhotoPro 04-05-2012 12:25 AM

Quote:

Originally Posted by Lynne (Post 2316698)
Please give us a URL to view the page. My guess is the HTML did show up, but your CSS is causing it to not do what you want.
Search this article for discussions on the problems using <li> on this page and the CSS you need to add to fix it.


Thank you for responding. My site is not operational yet, so it's turned off, but here is a screenshot of it:


This is my relevant .php code (forgive me if it's hilariously wrong :) ) :
Code:

// ###### YOUR CUSTOM CODE GOES HERE #####
$pagetitle = '';
$message = 'Hello world';
$var_name = '<h1>My Title</h1>My text<ul>
  <li>Cameras</li>
    <ul>
      <li><a href"cameras.html">DSLRs</a></li>
      <li>Point & Shoot</li>
    </ul>
  <li>Lenses</li>
  <li>Etc.</li>
</ul>

More text.

<a href="mailto:myemail">My Email</a>';


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

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

?>

This is my template:

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 Macro Image Hosting}</title>
    {vb:raw headinclude}
    {vb:raw headinclude_bottom}
  </head>
  <body>
   
    {vb:raw header}
   
    {vb:raw navbar}
   
    <div id="Macro Image Hosting">
      <h1>{vb:raw pagetitle}</h1>
    </div>
   
    <h2 class="blockhead">Macro Image Hosting</h2>
    <div class="blockbody">
      <div class="blockrow">
{vb:raw message}
{vb:raw var_name}

      </div>
    </div>
   
    {vb:raw footer}
  </body>
</html>


Again, forgive me if it is all hilariously wrong, but I am a rank beginner :D

Jack

AusPhotography 04-05-2012 01:19 AM

If you want a simple skeleton page bundled together as a vB product see:
https://vborg.vbsupport.ru/showthread.php?t=266449
It provides a tab and a Google search.

Because it is so lightweight it is easy to adapt to another purpose.
I published it as 'Re-usable Code' so no ? issues.

Kym

MacroPhotoPro 04-05-2012 02:33 AM

Quote:

Originally Posted by snoopytas (Post 2316858)
If you want a simple skeleton page bundled together as a vB product see:
https://vborg.vbsupport.ru/showthread.php?t=266449
It provides a tab and a Google search.

Because it is so lightweight it is easy to adapt to another purpose.
I published it as 'Re-usable Code' so no ? issues.

Kym


Thank you very much, Kym, I will try it. (Fine site BTW, congrats!)

And nice to meet another photographer too :D

Cheers,

Jack

michaelbang 04-08-2012 11:01 PM

Is it possible to create a new page, containing a new forum with new sections? I mean, basically copy the excisting "Forum" page to a new page with a new title, new sections, new forums etc?

Lynne 04-09-2012 03:09 AM

Quote:

Originally Posted by michaelbang (Post 2318155)
Is it possible to create a new page, containing a new forum with new sections? I mean, basically copy the excisting "Forum" page to a new page with a new title, new sections, new forums etc?

Sure, you could do that. You will need to tweak some of the code, but it will be possible. It isn't really anything to do with this article though.

dadoc 04-14-2012 03:56 AM

How can I add my forum sidebar to the page?

Lynne 04-14-2012 04:41 PM

You would need to add the template code from the FORUMHOME template into your template for the block and also add all the php from the forum.php file for the block to your php file (along with any templates needed, etc.)

karabaja3 04-18-2012 08:52 PM

Quote:

Originally Posted by Lynne (Post 1918511)
Did you add the template to the MASTER STYLE or just to one of your styles? And is that style the default style for unregistered users?


It's all the defaults that you get from the headinclude template. Yes, vbulletin.css is one of them.

I do not have orignal vbulletin style. Just the customized one. And I have crated a new template, just like you wroted, but when I go to www.my-forum.com/test.php I see a blank page only. No source code. Nothing.

Update: solved

wilford brimley 04-19-2012 04:05 AM

im working on this, thanks got my page going. Ive been looking through the 50 page sbut cant find my answers.

I need.
1. page to work in all skins not just default. I put a chat box on my page and a video stream
2. only want the page visible to certian usergroups and definatly not the general public.I want a private veiwng room. thannks.

Lynne 04-19-2012 03:18 PM

1. Then you need to add the template to all the skins.

2. Then put a condition regarding is_member_of - do a search in the thread on that function and you should find the answer.


All times are GMT. The time now is 01:04 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.07185 seconds
  • Memory Usage 1,746KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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