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)

ThreeD 08-08-2007 09:56 PM

Can anyone tell me how I can add "Last Activity" information of a user to a custom page, what hook do I have to include?

I am customizing the showgroups.php to redesign the staff list...and I want to include "last activity" but I can't seem to get it to work :( Shouldn't it be a simple line of code?

Day Dreamer 08-10-2007 08:02 PM

I was wondering if there was something I could add to force the page to be viewed in a certain style when people view it?

mackers8923 08-10-2007 10:13 PM

Would this hack work for a cubecart installation? I'm trying to integrate a cubecart shop with my vbulletin site.

Can I call another page from within a vbulletin template?

dutchbb 08-12-2007 02:08 PM

Hello Gary, is this possible:

I want a template in the admin cp >templates to to show as LINKS but some other templates should hide (collapsed) under it just like the SHOWTHREAD template has. This would make the template list less cluttered. How can this be done please?

ragtek 08-12-2007 02:47 PM

thats made with the name i
the 1.ellement needsthe name myhack
than the collapsed:
myhack_1
myhack_2

rnmcd 08-19-2007 04:20 PM

I've been looking for a way (outside of the forums) to display RSS feeds. Would this be a method to do that?

Thanks.

ravyn 08-21-2007 05:15 PM

I have to say this is the best, easiest, fastest, most efficient (and every other-est) way to create extra pages with the VB styles! It was so easy to set up and I found that it was just as easy as the rest of the board to customize. All of my styles worked right from the start and guests can view pages without any problems!

Here is a link to my site. The links 'Written Works', 'Art Gallery', Project Surreal Manga', and 'Anime Convention Gallery' are the custom pages. I know there's not much on them (the Anime Gallery is the only one with content), but I even found a way to display different stuff in the side columns (using the side column hack) and the VB_AREA function. It's a simple code that you can add to the php pages you have to upload.

Where is says in the php file:
define('THIS_SCRIPT', 'yourscript');

Below that add:
define('VB_AREA', 'test');

where 'test' is the area you want it to be named. keep it simple. I used simple words like art and manga. then when you make the links in your side columns, you can have separate links for your forums, then separate links for the custom pages:

<if condition="VB_AREA == test">
Links for your test page
</if>
<if condition="VB_AREA == VBA_PORTAL">
Separate links if you have VBAdvance portal
</if>
<if condition="VB_AREA == Forum">
regular links for the forum.
</if>

And this will work in the navbar too! I haven't found a place where the VB_AREA function doesn't work. I thought it would just be something cool to add so that for all the work you go through to make the custom pages, you can have custom links too!

jasonmerchant 08-21-2007 08:43 PM

After calling global.php, all the query string variables are emptied, and I'm guessing they are checked and then placed in another variable.

What variable are they moved to?

FWT 08-21-2007 11:46 PM

In the beginning example, I see $navbits[$parent] = 'Test Page'; but the var $parent is not set. What is this used for?

jasonmerchant 08-22-2007 01:51 AM

FWT:

$navbits is for the breadcrumb in the navbar template. It will set the text that is displayed at the end of the breadcrumb

Motoscene 08-27-2007 04:56 AM

I have been looking for something like this for awhile. THANKS!!!

Only having one problem with this mod. Don't know if this has been brought up yet though.
Why can you not use VB Code in the mod. I am making a links page and the url=www.link.com/url with brackets of coarse is not working.

I know some of you are having problems making this work at all. And I have found a small mistake in the upload of this to my forum on my part. If you make the text document in wordpad make sure that you use TEXT DOCUMENT not RICH TEXT DOCUMENT.

amnesia623 08-28-2007 11:59 PM

spectacular - just what i've been lookin' for

Thank you to everyone who posted this tutorial.

kjhkjh 09-10-2007 07:30 PM

Quote:

Originally Posted by Gary King (Post 482619)
1) correct
2) replace $bbuserinfo[usergroupid] == 6 with $bbuserinfo[usergroupid] == 7 or $bbuserinfo[usergroupid] == 8 or $bbuserinfo[usergroupid] == 9
3) Replace eval('print_output("' . fetch_template('TEST') . '");'); with your PHP stuff.

I'm looking at doing something similar here but don't understand the advice on some of these pages.

I have the template in place, and the web page showing. I just want to prevent guests from seeing this page (I'd rather that they saw the standard "you must be a member... blah, blah, no privileges..." vb type message)

I don't know if the quoted advice can help me, or where I should be changing stuff.

Does anyone know what code should I add/change?
Also do I change/add this in the template or in the php file?

Thanks in advance

ComputerVitals 09-17-2007 01:19 AM

Works great.

Is there any way of adding an Attachment feature like the threads can have?

ragtek 09-17-2007 05:07 AM

you would have to make a own class/dm abstracted from the attachment dm

Darth` 09-18-2007 04:25 PM

this all works great for me with one exception..
i use this to make a mini-site that only certain usergroups can access and all that works fine, my problem is in having a little navigation menu for the pages within this minisite.
basically as it was i had to have all the links on every page so adding a new one was becoming annoying, and im trying to get it so that the navmenu is a separate page/template, but cant get the nav template/page to display and have no idea why. anyone help please?

Opserty 09-19-2007 06:23 PM

Quote:

Originally Posted by Darth` (Post 1341816)
this all works great for me with one exception..
i use this to make a mini-site that only certain usergroups can access and all that works fine, my problem is in having a little navigation menu for the pages within this minisite.
basically as it was i had to have all the links on every page so adding a new one was becoming annoying, and im trying to get it so that the navmenu is a separate page/template, but cant get the nav template/page to display and have no idea why. anyone help please?

In the PHP file you can use:

PHP Code:

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

Then you can use $mynav in your custom template.

VBUsers 09-28-2007 10:36 PM

worked great thanks

XxBuLLeTz 10-01-2007 12:46 AM

say i want to create a page called stats as a vbulletin custom template.

my forums are located at mysite.com/forums, which means my stats page would be mysite.com/forums/stats.php

could i get it into the root directory so i could have the stats page at mysite.com/stats.php?

Tact7626 10-11-2007 06:46 PM

applied this on 3.6.8 (that's the latest version right? i forget sometimes)

worked BEAUTIFLY! thanks a lot. just have one teeny question.

my page shows up as "uknown page" in the "whos online" page when someone is visiting it. anyway to change that or give it a proper title so vbulletin displays it? prolly some title i'm missing somewhere. thanks in advance.

l3it3r 10-11-2007 07:55 PM

works great

gotlinks 10-15-2007 02:02 PM

This is just what I needed! Thanks much

edgecutioner 10-17-2007 04:22 PM

Quote:

Originally Posted by Tact7626 (Post 1357715)
applied this on 3.6.8 (that's the latest version right? i forget sometimes)

worked BEAUTIFLY! thanks a lot. just have one teeny question.

my page shows up as "uknown page" in the "whos online" page when someone is visiting it. anyway to change that or give it a proper title so vbulletin displays it? prolly some title i'm missing somewhere. thanks in advance.

read the article again

Tact7626 10-17-2007 06:09 PM

Quote:

Originally Posted by edgecutioner (Post 1362430)
read the article again

how stupid of me. this whole time, i thought the "who's online mod" was to make the box show in the new page. i didn't realize it was correct the "unknown page" thing. lol

thanks. if it was renamed "who's online fix" i think that would help. lol

Meje 11-07-2007 11:41 PM

love it thank you!

Ive had a look through this thread, but couldn't find what I'm after. Can someone please tell me what I need to do to get the 'whos online' and 'statistics' showing at the bottom of the page ?

Id also like to get this part to show on the page when they are not logged in/not registered?

Quote:

Welcome to the my forums.
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

DieselMinded 11-11-2007 08:10 AM

How Can I delete a template I made i dont use that page anymore and for the life of me i cant find out how to delete it in the AdminCP/Stylemanager

Opserty 11-11-2007 09:04 AM

Quote:

Originally Posted by DiesellMinded (Post 1380205)
How Can I delete a template I made i dont use that page anymore and for the life of me i cant find out how to delete it in the AdminCP/Stylemanager

Just revert the template, if it is a custom template then the template will be deleted.

Meghwar 11-14-2007 09:37 PM

1 Attachment(s)
thank you

great hack and i modify to Staff :) its great i creat that page for our Staff but i wish i can set permissions :) but its ok

thanx again
Regards
attached SS.

Triky 11-20-2007 10:10 AM

Thank you, Gary. :)
I've used the Who's Online Modification to adjuste on of my modifications where it said Unknok Location.

calumn 11-26-2007 10:48 AM

How can I get this to work in directories. I have tried to create a page in www.mydomain.com/directory/page/index.php

I changed test to index but it doesn't work because it says it can't find global.php

I know its because it is in a directory but how do I fix it?

amcd 11-26-2007 11:13 AM

global.php has been designed to be included from scripts in the same directory. You can change the directory to forum root, require global.php, and then change back to /directory/page and continue processing but I would not recommend it.

SBlueman 12-01-2007 11:48 PM

Would this be able to work at all on a Wordpress blog?

l3it3r 12-03-2007 12:03 AM

Quote:

Originally Posted by Nullifi3d (Post 774645)
IMO, an array would be better.

vB 3.0.x:
PHP Code:

if (!in_array($bbuserinfo['usergroupid'], array(6,8,13))) print_no_permission(); 

vB 3.5.x:
PHP Code:

if (!in_array($vbulletin->userinfo['usergroupid'], array(6,8,13))) print_no_permission(); 


This works better IMO..

THANKS!!

Opserty 12-03-2007 03:52 PM

Quote:

Originally Posted by l3it3r (Post 1393791)
This works better IMO..

You should use the is_member_of() function to do this properly.

PHP Code:

if(!is_member_of($vbulletin->userinfo12459))
{
    
//print_no...



Razasharp 12-05-2007 09:05 PM

Does anyone know if the output of a page created in this way could be cached? And the cached version displayed to the end user?

Perhaps with the cached page being updated via a cron job every ten minutes? That would be SO cool!

tunistunis 12-12-2007 12:19 PM

est ce que sa marche avec 3.8

apn3a 12-14-2007 04:15 PM

i have a php script that i am having trouble with. it is not written for vbulletin, but i would like to include it in my vb's template. this script has about 3-4 php files. i create a php file from which i run my script. i only include once the index.php of my script, which runs other php files from inside of it.

my problem is the following: when i run the script, everything is fine, the template is there etc. when i enter the details the script asks for, and i hit submit, the new window that opens does not have the vb template. i've tried everything, no luck. the window that opens when i hit submit has no action (etc. xxx.php?=something.) its just xxx.php. the funny thing is that if i have an error in my form, the template stays as it is even though a new window opens. the problem only occurs when i hit submit. please help

that's the action code from the script:

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">

cfitzarl 12-14-2007 11:01 PM

Very nice tutorial :)

Jase2 12-24-2007 04:58 PM

Hi,

Where do i put the HTML one?

Opserty 12-26-2007 08:22 AM

Quote:

Originally Posted by Jase2 (Post 1408481)
Hi,

Where do i put the HTML one?

In a new Template in your AdminCP ( -> Styles & Templates -> Style Manager -> Edit Templates)


All times are GMT. The time now is 02:21 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05089 seconds
  • Memory Usage 1,833KB
  • 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_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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