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)

persianvb 02-05-2010 07:23 AM

1 Attachment(s)
hi

How do I remove the advertising and Announcements?

Thanks,

firstimecaller 02-08-2010 11:14 AM

Any tips on using these fundamentals for creating a vB wrapper for other scripts?

edit: I've got this part sorted pretty much. I'm making static files updated by chron'ed script to save on overhead.

I want the look of the vB4 style I've created to wrap around some other scripts on my site. I've used a plugin to create new tabs to cover these sections. I need to generate the top and bottom (a wrapper) of the page to include in the templates of these other scripts.

So, I need to set which tab is 'on' and then generate segments of the page.

Lynne 02-08-2010 07:42 PM

Some of the navtab mods allow you to set a navtab on, and some don't. I know my article and ragtek's artilce about adding navtabs cover setting them on, but I don't know about other mods.

borbole 02-08-2010 10:53 PM

Thank you Lynne. I was looking for something like this and it helped me a lot in the hack that I created. :)

teamshultz 02-09-2010 01:46 AM

How would you apply one of the built in layouts to a custom page? I'd like to do this so I can easily add widgets.

Lynne 02-09-2010 03:24 AM

Quote:

Originally Posted by teamshultz (Post 1977981)
How would you apply one of the built in layouts to a custom page? I'd like to do this so I can easily add widgets.

This article has nothing to do with building pages for the CMS. You may only use the layouts and widgets on pages within the CMS.

teamshultz 02-09-2010 11:00 PM

Ahh, I see. Thank you. Could you possibly direct me to some reading materials?

OcR Envy 02-10-2010 02:08 PM

Hi Lynne!

So I'm trying to create an extra page in my UserCP. I'm finding that although it renders the UserCP template correctly it's missing some fields on the left sidebar.

The following don't display:
Inbox, Sent Items, Edit Email & Password, Edit Ignore List, All Moderation Listings(Deleted Items, Moderated Items, New Items)

My code thus far:

PHP Code:

<?php

error_reporting
(E_ALL & ~E_NOTICE);
define('THIS_SCRIPT''shoop');
define('CSRF_PROTECTION'true);  
$phrasegroups = array();
$specialtemplates = array();
$globaltemplates = array('USERCP_SHELL',
);
$actiontemplates = array();
require_once(
'./global.php');
require_once(
'includes/functions_user.php'); 

$navbits construct_navbits(array('' => 'shoop'));
construct_usercp_nav('pokersites');
$navbar render_navbar_template($navbits);

$pagetitle 'shoop';


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

?>


Lynne 02-10-2010 07:23 PM

Quote:

Originally Posted by teamshultz (Post 1978714)
Ahh, I see. Thank you. Could you possibly direct me to some reading materials?

Tons of stuff over on vb.com. Go to their Home page link and you should see Don's name on the third (I think) article. Click to see all his articles.
Quote:

Originally Posted by OcR Envy (Post 1979138)
Hi Lynne!

So I'm trying to create an extra page in my UserCP. I'm finding that although it renders the UserCP template correctly it's missing some fields on the left sidebar.

The following don't display:
Inbox, Sent Items, Edit Email & Password, Edit Ignore List, All Moderation Listings(Deleted Items, Moderated Items, New Items)

My guess would be you need to include a certain phrasegroup in the phrasegroup array.

OcR Envy 02-11-2010 11:55 AM

Yep for anyone interested I just edited up usercp.php to my liking :)

firstimecaller 02-11-2010 12:30 PM

cool! link us to the best docs/posts you referenced

Grae 02-14-2010 12:31 PM

Thank you Lynne :up:

I noticed that the code you provided registers two variables, navbar and pagetitle. However, there are six variables listed in the template: vboptions.bbtitle, pagetitle, headinclude, header, navbar, and footer. It seems that four of these variables don't need to be manually registered. Is there a list of all variables that don't need to be registered?

TheSupportForum 02-15-2010 10:28 AM

is it poosible to make the php files more W3C Complaint along with the templates
my templates for the php files are perfect except there not W3C complaint and would like like help converting templates to W3C Complaint

Conc 02-16-2010 05:49 PM

Sorry if this has been asked before--I was looking for a similar problem but couldn't find any:

Is there a way to include widgets (specifically, I'm thinking of the "Recent Articles" & "Recent Forum Posts" widgets) in a custom page template? Easily, maybe?

Thanks much for this impressive walkthrough.

Lynne 02-16-2010 05:51 PM

Quote:

Originally Posted by Conc (Post 1983921)
Sorry if this has been asked before--I was looking for a similar problem but couldn't find any:

Is there a way to include widgets (specifically, I'm thinking of the "Recent Articles" & "Recent Forum Posts" widgets) in a custom page template? Easily, maybe?

Thanks much for this impressive walkthrough.

Widgets are for CMS only. I do not know how to get them to work on other pages.

Sarcoth 02-17-2010 08:15 PM

Thanks Lynne. This helped me fix a few problems in my template code.

ZuluTango 02-17-2010 09:37 PM

Quote:

2. Create the Template:
- If you are in debug mode, create the template in your MASTER STYLE so it shows up in all your styles, otherwise make sure you create the template in the style you are using. If following the page above, call the template TEST with the following content:
Hello all, can you please direct me to where I can learn how to complete this part? Thanks

Lynne 02-18-2010 04:28 AM

Quote:

Originally Posted by ZuluTango (Post 1985050)
Hello all, can you please direct me to where I can learn how to complete this part? Thanks

The manual should help you on how to add a template - Editing the Templates

Alien 02-18-2010 04:55 AM

Don't forget to add:

Code:

{vb:raw headinclude_bottom}
...before the closing </head> tag, as vBulletin 4.01+ has added by default. :)

Still works great!

Lynne 02-18-2010 11:55 PM

Quote:

Originally Posted by Alien (Post 1985303)
Don't forget to add:

Code:

{vb:raw headinclude_bottom}
...before the closing </head> tag, as vBulletin 4.01+ has added by default. :)

Still works great!

Thank you for the reminder!

Added to the first post.

TheSupportForum 02-19-2010 08:18 PM

lynne,

please can you help with template issues

everytime i create a template now, i get the following error for IE8


Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed

Lynne 02-19-2010 09:17 PM

Sorry, but this thread isn't for debuging template issues. If you need help on something other than writing a vB page, you really need to post in the main forums (and possibly on vb.com if this is not regarding a modification).

patrick91 02-21-2010 03:49 PM

First! thanx for evething!;) but i have a little thing that is going wrong! the footer...

A i see i fixed! forgot a div. ;)

djbaxter 02-23-2010 01:50 AM

I'm trying to create a custom page as described above.

However, if I insert HTML where it says "Text" in the template:

Code:

  <h2 class="blockhead">Title</h2>
    <div class="blockbody">
      <div class="blockrow">
        Text
      </div>
    </div>

The HTML isn't processed (e.g., UL, OL, LI, H2, H3 tags, etc.).

Lynne 02-23-2010 03:09 AM

Quote:

Originally Posted by djbaxter (Post 1989325)
I'm trying to create a custom page as described above.

However, if I insert HTML where it says "Text" in the template:

Code:

  <h2 class="blockhead">Title</h2>
    <div class="blockbody">
      <div class="blockrow">
        Text
      </div>
    </div>

The HTML isn't processed (e.g., UL, OL, LI, H2, H3 tags, etc.).

Take a look at the CSS in the page. It could be that the CSS is changing what you would think of as the default style for those tags.

djbaxter 02-23-2010 04:31 AM

Tnanks, Lynne. That does seem to be the problem. I'm not certain where the CSS is being set but it seems to have disabled some HTML features, while others are allowed.

For now, I can work around it.

Joseph Witchard 02-28-2010 02:07 AM

Great article:) In your examples, what is mypage referring to?

Skreech94 03-03-2010 03:52 AM

I didn't read through this thread to see if it was asked, so I apologize in advanced just in case.
Anyways, I dont want my guests viewing the page I made, but I want my members to view it. How would I do this?

TalkVirginia 03-03-2010 04:50 AM

This is giving me a MAJOR Migraine!! Please-- Can someone help me with this??

I'm trying to append some text or link at the end of the footer using the parse_templates hook in a plugin..

This is my code:

PHP Code:


$myfooter 
'my test string';
vB_Template::preRegister('footer',array('myfooter' => $myfooter)); 


Lynne 03-04-2010 03:48 AM

Quote:

Originally Posted by Skreech94 (Post 1995764)
I didn't read through this thread to see if it was asked, so I apologize in advanced just in case.
Anyways, I dont want my guests viewing the page I made, but I want my members to view it. How would I do this?

Right after Start Main Script add something like:
PHP Code:

if (!isset($vbulletin->userinfo['userid']) OR $vbulletin->userinfo['userid'] == 0)
{
        
print_no_permission(); 


Quote:

Originally Posted by TalkVirginia (Post 1995789)
This is giving me a MAJOR Migraine!! Please-- Can someone help me with this??

I'm trying to append some text or link at the end of the footer using the parse_templates hook in a plugin..

This has nothing to do with this article. Your best bet it to post in the main forums for help with this.

TalkVirginia 03-04-2010 08:35 AM

Quote:

Originally Posted by Lynne (Post 1996608)
This has nothing to do with this article. Your best bet it to post in the main forums for help with this.

I have. ...and as usual, I haven't been able to get help with this so I thought I would post in several places that related to the issue I was having.

Lynne 03-04-2010 01:31 PM

Quote:

Originally Posted by TalkVirginia (Post 1996738)
I have. ...and as usual, I haven't been able to get help with this so I thought I would post in several places that related to the issue I was having.

I don't have a quick answer for you as I have never needed to add something to the end of that template that I couldn't just put in the ad template or do a str_replace with.

TalkVirginia 03-04-2010 02:17 PM

Quote:

Originally Posted by Lynne (Post 1996928)
I don't have a quick answer for you as I have never needed to add something to the end of that template that I couldn't just put in the ad template or do a str_replace with.

That's ok Lynne. I appreciate the response anyway. I actually found what I was looking for in another thread. It was so simple it's scary. :eek:

https://vborg.vbsupport.ru/showpost....8&postcount=82

Lynne 03-04-2010 05:31 PM

Quote:

Originally Posted by TalkVirginia (Post 1996979)
That's ok Lynne. I appreciate the response anyway. I actually found what I was looking for in another thread. It was so simple it's scary. :eek:

https://vborg.vbsupport.ru/showpost....8&postcount=82

Thank God for str_replace. :) Glad you found a solution.

nykegodess 03-05-2010 05:30 PM

Thank you very much, it took me ages to work out (my silliness). I read every post, just as i was about ask a question, i figured it out.

My advice to others read through before posting and double check everything, the smallest mistake will ruin your efforts! :D

Thank you again!

Joseph Witchard 03-07-2010 05:59 AM

What exactly is the point of making extra pages? Is it to run certain scripts, like from a mod you make or something?

TalkVirginia 03-07-2010 10:02 AM

Quote:

Originally Posted by nykegodess (Post 1997920)
Thank you very much, it took me ages to work out (my silliness). I read every post, just as i was about ask a question, i figured it out.

My advice to others read through before posting and double check everything, the smallest mistake will ruin your efforts! :D

Thank you again!

I know the feeling Godess.. I thought I was going to have a meltdown, but it turned out to be easier than I thought.

Glad to hear you got yours to work for you! :)

--------------- Added [DATE]1267963665[/DATE] at [TIME]1267963665[/TIME] ---------------

Quote:

Originally Posted by Joseph Witchard (Post 1998897)
What exactly is the point of making extra pages? Is it to run certain scripts, like from a mod you make or something?

Yes, exactly... When you're using php to create pages, generally it will be use in developing some sort of mod or addon. This allows your page to show dynamically generated data instead of data that doesn't change like a plain HTML page.

Joseph Witchard 03-08-2010 02:28 AM

Okay. If you wanted to create a script to run in the Admin CP, how exactly would you get the page to go (look-wise) with the other pages in the Admin CP? Same question applies for a page in the main forum area.

Lynne 03-08-2010 03:27 AM

Quote:

Originally Posted by Joseph Witchard (Post 1999556)
Okay. If you wanted to create a script to run in the Admin CP, how exactly would you get the page to go (look-wise) with the other pages in the Admin CP? Same question applies for a page in the main forum area.

Pages in the Admin CP are done a totally different way. They do not use templates at all. I don't understand your question about it applying to the main forum area since this makes a page that looks just like the rest of the forum (same header, navbar, footer, you just fill in the stuff in between).

Joseph Witchard 03-08-2010 03:41 AM

I just meant that all the pages in the Admin area have a common theme with each other (the navigation menu on the left, the same colors, same style of buttons, etc.). In the same way, the main forum area has its own theme with its pages (same colors and buttons, etc.). What I was asking is what do you do to get your custom pages to go with the theme of the area they're in. If you're making a page to run in the Admin CP, how do you get it to look similar to the other pages in the Admin CP? If you're making a page for the main forum area, how do you make it where it looks like the rest of your forum pages?


All times are GMT. The time now is 05:08 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.02408 seconds
  • Memory Usage 1,851KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_php_printable
  • (17)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