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)

Lynne 06-23-2010 02:24 PM

Sometimes the line number isn't exact - so look *around* line 44.

ragtek 06-23-2010 02:56 PM

Or youre template is not correct

eues 06-24-2010 06:02 PM

so could i use this to pull in code from wordpress installed on the same server? so it would be wordpress inside a vbulletin theme?

Lynne 06-24-2010 07:08 PM

Quote:

Originally Posted by eues (Post 2058948)
so could i use this to pull in code from wordpress installed on the same server? so it would be wordpress inside a vbulletin theme?

Sure, as long as you can write the code to do so.

eues 06-24-2010 10:39 PM

Quote:

Originally Posted by Lynne (Post 2058978)
Sure, as long as you can write the code to do so.

ah good to know! Thanks Lynne

There's no way i'd ever be able to write the code though :( do you know of any tutorials that may help me out so i could give it a go?

Lynne 06-25-2010 02:24 AM

Quote:

Originally Posted by eues (Post 2059091)
ah good to know! Thanks Lynne

There's no way i'd ever be able to write the code though :( do you know of any tutorials that may help me out so i could give it a go?

A tutorial on pulling info from wordpress? Sorry, I don't as I have never used wordpress for anything.

jdrakopo 06-29-2010 01:42 PM

Is everyone getting this to work in IE ?
In Chrome, all is well.
In IE 7, this does not seem to work (I've not tried IE 8).
Thanks.

---------------------
I'm updating this post since I realize I am doing an <embed
And - that has problems in IE.

Cheers.

xqzme 07-09-2010 07:39 PM

I've cut, pasted and edited the php file and created the template file, but I get a blank page for http://mydomain.org/siteterms.php.

siteterms.php has been uploaded to root directory with other php files. Changed TEST to siteterms (the name of the template). Anything simple jump out or that I should look into?

nci 07-10-2010 06:07 AM

I have a working page,yet it never register the members session,when members are on the page it will show that they are not logged in and no matter how many times they try to logged in,It will still show that they are not logged in,except they click the forum link.
What is the problem?.
Do i need to create a separate session for the page?.

Wilfred1 07-16-2010 07:07 AM

I wonder if you can help me with this one Lynne

The problem I have is defining the WOS statement for:
Code:

Unknown Location
/index.php?pageid=news_reader

What I have which doesn't work (the others do) is:
Code:

    case '../index.php?pageid=news_reader':
       
$userinfo['activity'] = 'News Reader';
        break;

and
Code:

  case 'News Reader':
        $userinfo['where'] = '<a href="../index.php?pageid=news_reader">News Reader</a>';
        $userinfo['action'] = "Viewing Page";
        $handled = true;
        break;


Nicke71 07-18-2010 08:37 PM

Thanks Lynne, will dig more into this as I intend to do my own pages / apps a part of vB instead of outside vB.

Very helpful.

euantor 07-29-2010 09:22 AM

I've followed this to the letter, yet I'm getting " " at the top of every new page. Strangely, these characters don't usually appear on the main site. Any ideas anybody?

Lynne 07-29-2010 02:27 PM

Quote:

Originally Posted by euantor (Post 2076160)
I've followed this to the letter, yet I'm getting " " at the top of every new page. Strangely, these characters don't usually appear on the main site. Any ideas anybody?

Those are characters you get when you are not using just a basic text editor. You need to use something like notepad++ or bbedit to edit the php files or hidden characters can get added to the page.

2fast4ya 07-29-2010 07:52 PM

Okay, I've read this article a thousand different times, and it's shown me the thousand different reasons why I'm such a noob when it comes to this stuff. So bare with me here.

I understand the concept of creating the PHP page where all of your content will fall under. This is is where I add the custom HTML or PHP code for the extra content that I wanted. For example, an "About Us" page.

Now it's my understanding that once you create this test.php page, you need to then create a Template in VB to CALL that php page. Am I wrong? Because when I'm looking at the Create a Template code, I can't see any part of that code that calls on test.php ...

Again, I'm sure I'm missing something simple and obvious and stupid, but I have to ask.

Let me just start to understand this concept first before I even begin to try to do this. If I can pull this off without losing my mind in frustration it would be great lol :o

Lynne 07-29-2010 10:14 PM

Quote:

Originally Posted by 2fast4ya (Post 2076480)
Now it's my understanding that once you create this test.php page, you need to then create a Template in VB to CALL that php page. Am I wrong? Because when I'm looking at the Create a Template code, I can't see any part of that code that calls on test.php ...

Actually, it's the opposite. The test.php page calls the template.

Nicke71 07-30-2010 03:42 AM

Hi Lynne.

I just made my first vb powered page, it fetch local movie showtimes and displays it.

I just wonder how to handle css within this page? I added css to additional.css file, but it is possible to have the extra css only for my custom page? (Instead of making it loading for all vb pages)

And thanks again for all help you provide to vb community.

Lynne 07-30-2010 02:06 PM

Quote:

Originally Posted by Nicke71 (Post 2076654)
Hi Lynne.

I just made my first vb powered page, it fetch local movie showtimes and displays it.

I just wonder how to handle css within this page? I added css to additional.css file, but it is possible to have the extra css only for my custom page? (Instead of making it loading for all vb pages)

And thanks again for all help you provide to vb community.

You could add CSS directly into your template, or create a new css template and include it in your page by following the examples of how it is included in the headinclude and headinclude_bottom template.

2fast4ya 07-30-2010 08:27 PM

i figured it out! Thank you so much Lynne for your wonderful help!

Nicke71 07-31-2010 11:55 AM

Thanks, I added it to the template and it worked fine. Probably the best way if only one page use the css.

mordor1 08-04-2010 02:56 PM

Does any 1 know how make a redirect on a costum page if user is not loged in?

rfsforums 08-04-2010 08:54 PM

I have notices that are shown in the forum for unregistered users but I'd like to not display them on this new page. How can I turn them off? Thanks for the great article got it to work on the 2nd attempt!

Lynne 08-04-2010 09:08 PM

Quote:

Originally Posted by mordor1 (Post 2079162)
Does any 1 know how make a redirect on a costum page if user is not loged in?

Put in a Meta Redirect Tag in the template. Put a condition around it based on whether they are a guest or not.
HTML Code:

<vb:if condition="$show['guest']">your tag code</vb:if>
Quote:

Originally Posted by rfsforums (Post 2079349)
I have notices that are shown in the forum for unregistered users but I'd like to not display them on this new page. How can I turn them off? Thanks for the great article got it to work on the 2nd attempt!

Put a condition around the notifications based on THIS_SCRIPT (change 'test' to whatever you defined THIS_SCRIPT to be in your page):
HTML Code:

<vb:if condition="THIS_SCRIPT == 'test'">notification code</vb:if>

NathanLedet 08-04-2010 09:53 PM

If I'm making a plugin that users can access via their User Control Panel, how do I make it so that the left sidebar shows up?

Thanks :)

rfsforums 08-04-2010 10:43 PM

Quote:

Originally Posted by Lynne (Post 2079355)
Put a condition around the notifications based on THIS_SCRIPT (change 'test' to whatever you defined THIS_SCRIPT to be in your page):
HTML Code:

<vb:if condition="THIS_SCRIPT == 'test'">notification code</vb:if>

Thanks Lynne for the super fast reply! I thought I located the 'notification code' in the navbar template and put the condition around everything I could think of. When it did work it also hid the notices on the forum home which I don't want. Can you give me a little more guidance?
Many Thanks!

Lynne 08-05-2010 12:58 AM

Quote:

Originally Posted by NathanLedet (Post 2079369)
If I'm making a plugin that users can access via their User Control Panel, how do I make it so that the left sidebar shows up?

Thanks :)

I have no idea. There is a mod to add the sidebar to other pages, so I'd suggest you look at that mod and see how he did it.

Quote:

Originally Posted by rfsforums (Post 2079389)
Thanks Lynne for the super fast reply! I thought I located the 'notification code' in the navbar template and put the condition around everything I could think of. When it did work it also hid the notices on the forum home which I don't want. Can you give me a little more guidance?
Many Thanks!

You know, I goofed on that, it should have been like this:
HTML Code:

<vb:if condition="THIS_SCRIPT != 'test'">notification code</vb:if>

TheSupportForum 08-05-2010 02:27 PM

i would like to create an admincp page available to Admins, Super Moderators and Moderator

please could someone please provide a standard template for this

thank you

Lynne 08-05-2010 02:43 PM

Quote:

Originally Posted by simonhind (Post 2079617)
i would like to create an admincp page available to Admins, Super Moderators and Moderator

please could someone please provide a standard template for this

thank you

I don't have a template for an admin cp page. I have seen an article about how to add pages to the admincp though, so you should do a search for it.

TheSupportForum 08-05-2010 02:46 PM

i will try give it a go by searching, but if anyone has a working example of an admincp php file please post it

mordor1 08-07-2010 09:22 AM

Quote:

Originally Posted by Lynne (Post 2079355)
Put in a Meta Redirect Tag in the template. Put a condition around it based on whether they are a guest or not.
HTML Code:

<vb:if condition="$show['guest']">your tag code</vb:if>
Put a condition around the notifications based on THIS_SCRIPT (change 'test' to whatever you defined THIS_SCRIPT to be in your page):
HTML Code:

<vb:if condition="THIS_SCRIPT == 'test'">notification code</vb:if>

Got it tanks!

Tahooma 08-11-2010 06:12 AM

Any Info how i could put a standard template around my php ?
Means, that my php looks like the homepage, so i just really reuse the VB CMS Templates ?
Just want to look my subpage like the homepage, with the sidebar, navigation, calendar,...

Thanks in advance

cellarius 08-11-2010 06:22 AM

Then why don't you create a custom php page in the CMS in the first place? No sense in recreating the whole CMS infrastructure, when you just could use it. ;)

Tahooma 08-11-2010 06:53 AM

Quote:

Originally Posted by cellarius (Post 2082043)
Then why don't you create a custom php page in the CMS in the first place? No sense in recreating the whole CMS infrastructure, when you just could use it. ;)

My goal is to integrate a mod which uses the whole width of the screen into the "3 columns" design.
As i am very ned wo vBulletin, i thought the easiest way would be to force the .php file into the templates.

Dragonsys 08-11-2010 08:51 PM

Quote:

Originally Posted by Wilfred1 (Post 2069928)
I wonder if you can help me with this one Lynne

The problem I have is defining the WOS statement for:
Code:

Unknown Location
/index.php?pageid=news_reader

What I have which doesn't work (the others do) is:
Code:

    case '../index.php?pageid=news_reader':
       
$userinfo['activity'] = 'News Reader';
        break;

and
Code:

  case 'News Reader':
        $userinfo['where'] = '<a href="../index.php?pageid=news_reader">News Reader</a>';
        $userinfo['action'] = "Viewing Page";
        $handled = true;
        break;


I am trying to find a solution for this as well. What I have tried i using the online_location_preprocess hook.

my code looks like this:
Code:

if ($loc == './error.php?error=400')
{
    $filename = 'error_400.php';
}
if ($loc == './error.php?error=401')
{
    $filename = 'error_401.php';
}
if ($loc == './error.php?error=403')
{
    $filename = 'error_403.php';
}
if ($loc == './error.php?error=404')
{
    $filename = 'error_404.php';
}
if ($loc == './error.php?error=500')
{
    $filename = 'error_500.php';
}

and then in online_location_process i have:
Code:

if ($filename == 'error_400.php')
{
        $userinfo['activity'] = 'error400';
}
if ($filename == 'error_401.php')
{
        $userinfo['activity'] = 'error401';
}
if ($filename == 'error_403.php')
{
        $userinfo['activity'] = 'error403';
}
if ($filename == 'error_404.php')
{
        $userinfo['activity'] = 'error404';
}
if ($filename == 'error_500.php')
{
        $userinfo['activity'] = 'error500';
}

But I still get Unknown Location.

ArtakEVN 08-13-2010 02:12 AM

Quote:

Originally Posted by LoveStream (Post 1916679)
Thank your tutor.
I had met following error, when I using this template page, there is a cookie sent already.

Uh!
PHP Code:

Unable to add cookiesheader already sent.
File: /www/forum/phoenixjournals.php
Line
1

Forums test 

I create scripts as phoenixjournals.php, but it occur if I logout.

How could I solve it? or what deos it mean in this case?

I hope your teaching. Thanks.

Maybe you save your file in unicode.

choitz 08-15-2010 07:19 PM

Hi,
This has all worked brilliantly after flicking a bit between the original and Lynn's article (more of a case of me having to get my head round it).

Now, I don't know if it's a roblem with my custom style, but standard html doesn't seem to be having any effect on my pages, for example:
Code:

<UL><LI>[</LI></UL> <STRONG></STRONG> <I></I>
but;
Code:

<a href="..."></a>
works. I'd be grateful for any ideas why?

Cheers

Lynne 08-15-2010 08:00 PM

Use a div of class="restore" around the code to get back to normal html.

choitz 08-16-2010 04:53 PM

Quote:

Originally Posted by Lynne (Post 2084421)
Use a div of class="restore" around the code to get back to normal html.

Thanks for helping me out with a n00b problem Lynn, for the record if anyone else has that problem the double quotes (")after A HREF are left in, but if you use single (') or none at all then it works. Thanks again Lynn!

AfterWorldForum 08-19-2010 09:02 AM

Lynne,

Thanks for converting the article to a vB4 version. It's very helpful for those of us offering some custom-built pages.

If you do not mind, I do have a question about tables, though. I've used the approach a lot where I offer a custom page to pull some custom data from the database. Typically, this means I connect to the db, pull out data, and then build one huge HTML string with tables to represent the data.

I have looked, but not managed to find a definite article on how to achieve the same but consistent with the vB4 coding standards. I have tried looking at the CSS classes used in the vB4 pages, but I have to admit that is kind of over my head (I will admit I did not spend THAT much time on it, considering I still am trying to solve lots of issues left over after the migration).

As a simple example, I used to use alt1 and alt2. I can wrap one of those div class="restore"> around the table definition, but were I to totally rewrite my pages so they also match with the vB4 styles I use, how would I go at that, exactly? And where would I be able to find the restore class in the new stylevar setup, so I could actually alter the (for instance) alt1 and alt2 tags?

Sorry if you feel I am hijacking your thread. I just have not found a way to actually solicit for an article or guide, and custom pages is where I imagine lots of people will be using tables.

Thanks in advance, and I apologize for what might appear as an thread hijack.

Peter

Lynne 08-19-2010 02:46 PM

If you do a Search in Templates for ".restore", you'll find them all defined in vbulletin.css. I never change things in that template though, the best thing to do is put new CSS in addiitional.css

If you need help with something, you just post in the main (vB$, in this case) forums. Usually you don't ask for an article, you just ask for help. Then, either the person helping, or the person who got helped, may throw together an article to help others.

AfterWorldForum 08-19-2010 04:23 PM

Quote:

Originally Posted by Lynne (Post 2086363)
If you do a Search in Templates for ".restore", you'll find them all defined in vbulletin.css. I never change things in that template though, the best thing to do is put new CSS in addiitional.css

If you need help with something, you just post in the main (vB$, in this case) forums. Usually you don't ask for an article, you just ask for help. Then, either the person helping, or the person who got helped, may throw together an article to help others.

Thanks Lynne. I'll have a peek at the vbulletin.css. Should that not work out, I'll post a question :)


All times are GMT. The time now is 12:27 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.02527 seconds
  • Memory Usage 1,859KB
  • 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
  • (10)bbcode_code_printable
  • (6)bbcode_html_printable
  • (1)bbcode_php_printable
  • (18)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