Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
[How to] Add custompages to your forum Details »
[How to] Add custompages to your forum
Mod Version: 1.01, by utw-Mephisto (Member) utw-Mephisto is offline
Developer Last Online: Feb 2013 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.6.0 Rating: (9 votes - 4.78 average) Installs: 85
Released: 23 Aug 2006 Last Update: 24 Aug 2006 Downloads: 409
Not Supported Template Edits  

This is not really a mod, since this is simply a "reminder" of a function build in but not documented. Submitted also to vbulletin.com of course.

If you would like to add custom pages (including header / footer of your forum) do the following:

Add a new template in the style of your choice. You can name it whatever you want, it has to have the prefix

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

though.

You are then able to call the custompage using

http://www.ut2007world.com/misc.php?do=page&template=test2

Change www.ut2007world.com with your domain and the test2 with your template name accordingly.

Lets make an example.

Admincp > Styles & Templates > Style Manager > In drop down choose Add New Template

Name the template for example custom_google

Use the following code :


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

As you can see, I just use an iframe for you to see any results.

Now use your web-browser and go to

http://<domain>/misc.php?do=page&template=google

And change the domain to your own.

See attached a screenshot how the above example would look like. Also attached a default html code for a template. The page name will be automatically parsed in the navbar.

If you would like to have the code displayed for certain usergroups only, you can add one ID


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Or more usergroup IDs


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

If you just would like to make sure that ANY user who is registered can see the code, regardless of its group, add


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

instead.

Example code would be now:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


On request:
Creating Custom Pages using vbadvanced
Anyway, some people would like to add for example flashchat, irc chat or simple iframes including all those modules etc. etc.

Some demos :

FlashChat
Custom Stuff

etc. etc.

So lets get started.

First, you need to create a template. Lets use as exmaple an iframe where google.com runs in it ...

Create a new template with the prefix adv_portal_ and name it for example google.

Admincp > Styles & Templates > Style Manager > In drop down choose Add New Template



Put in the code


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and call it adv_portal_google



Now add a new Page which is Template Based



Page Title : What you would like to have displayed in the browser title bar
Page Identifier : This is the variable that will be used in the URL to link to this page. For example, if this option is set to 'games', then the link to this page would look like this: /cmps_index.php?page=games
Template : adv_portal_google

Should look something like



You don't have to use the Module Shell Template Options, only if you would like to have a typicall box around the stuff you display including the button to expand / collapse it

Now the important stuff : modules

There is not really a guideline for it ... The most important modul you need :

Custom Page Content

If you don't use it - you will get a white page ..

But for this example, lets disable all modules in the middle, except the one just mentioned, and some modules on the left and right. You will proparbly have a different module set, but once again : Custom Page content MUST and WILL be there



Since you named the identifier google - you can browse now to that page using

http://<domain>/cmps_index.php?page=google


IF you renamed cmps_index.php to index.php - you need to change that of course...

Here is a demo :

http://www.ut2007world.com/index.php?page=google


Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	untitledvd9.jpg
Views:	1297
Size:	66.0 KB
ID:	52566  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Forum Display Enhancements Localize (translate) forum name, forum titles & forum descriptions Analogpoint vBulletin 3.6 Add-ons 37 10 Sep 2012 20:01
Forum Activity Check For Forum Access (Per Forum) sabret00the vBulletin 3.0 Beta Releases 32 05 Jul 2005 02:51

Comments
  #2  
Old 24 Aug 2006, 00:41
Selene Selene is offline
 
Join Date: Feb 2005
excellent and very useful!

thanks for it.

tested and worked
Reply With Quote
  #3  
Old 24 Aug 2006, 00:42
utw-Mephisto utw-Mephisto is offline
 
Join Date: Feb 2005
Glad to hear Its a shame that this is not documented even though its a build in option
Reply With Quote
  #4  
Old 24 Aug 2006, 11:34
Selene Selene is offline
 
Join Date: Feb 2005
utw, just one question tho, what i want that page to be viewed by Registered Members only. Is that possible?
Reply With Quote
  #5  
Old 24 Aug 2006, 11:36
Benedict Benedict is offline
 
Join Date: Jan 2006
That's a great hack thank you.

I too would be interested in knowing if i can modify this to show for selected usergroups
__________________
my humble forum
Reply With Quote
  #6  
Old 24 Aug 2006, 11:47
utw-Mephisto utw-Mephisto is offline
 
Join Date: Feb 2005
Originally Posted by Selene
utw, just one question tho, what i want that page to be viewed by Registered Members only. Is that possible?
You could add an <if> condition to achieve it


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

where the 2 is the usergroup id which is in this example registered user.

If you would like to speficy or usergroupids use


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and so on .. the complete template would look like


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

However, I am not a professional if it comes to <if> stuff. In this example you simply would not see the iframe instead of getting an error and you need to specify each usergroup id .. if you specify registered user, you still need to add administrator as well otherwise you won't be able to see it either ..

There is another solution for this, I simply don't know it... but lemme browse a bit here and on vb.com - I might come up with a solution ...
Reply With Quote
  #7  
Old 24 Aug 2006, 11:58
Benedict Benedict is offline
 
Join Date: Jan 2006
That looks good enough for me. Thank you for the clear and thorough response
__________________
my humble forum
Reply With Quote
  #8  
Old 24 Aug 2006, 12:01
utw-Mephisto utw-Mephisto is offline
 
Join Date: Feb 2005
Not good for me though - I NEED to know

I will keep you posted of course ..
Reply With Quote
  #9  
Old 24 Aug 2006, 12:08
utw-Mephisto utw-Mephisto is offline
 
Join Date: Feb 2005
Ok, if you use

<if condition="$bbuserinfo[userid]">

instead, you don't have to specify all usergroup ids, still no error though ..
Reply With Quote
  #10  
Old 24 Aug 2006, 12:53
Selene Selene is offline
 
Join Date: Feb 2005
Ok i wanted guests not to view that page.

So i did:

<if condition="$bbuserinfo['usergroupid'] == '2'">

(my code)

</if>
For the msg that i wanted to show the "guests" i just used IF code again and specified the Guest usergroup and wrote the msg so it works now

Cool!
Reply With Quote
  #11  
Old 24 Aug 2006, 16:18
utw-Mephisto utw-Mephisto is offline
 
Join Date: Feb 2005
Originally Posted by Selene
Ok i wanted guests not to view that page.

So i did:



For the msg that i wanted to show the "guests" i just used IF code again and specified the Guest usergroup and wrote the msg so it works now

Cool!
Nice "think outside the box" - solution - cool ..

Last edited by utw-Mephisto; 24 Aug 2006 at 16:21.
Reply With Quote
  #12  
Old 24 Aug 2006, 17:30
utw-Mephisto utw-Mephisto is offline
 
Join Date: Feb 2005
Ok, I was playing around a bit..

If your template would look like


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Which would look like



You can also remove the $bbuserinfo[username] and replace it with something you like or whatever ...

Since I am using in the example above <if condition="$bbuserinfo[userid]"> - it will give out an error regardless of the usergoupid
Reply With Quote
  #13  
Old 24 Aug 2006, 18:07
Selene Selene is offline
 
Join Date: Feb 2005
utw, nice one!

thanks a lot for this one. I am going to use this custom page thing on my vbulletin site.
Reply With Quote
  #14  
Old 24 Aug 2006, 20:09
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Why doesn't vBulletin document things like this -- it's a huge time-saver.
__________________
Former vBulletin.org Staff Member

Please feel free to re-use any of the code in any of my projects submitted to vB.org, so long as original attribution is retained.
Reply With Quote
  #15  
Old 24 Aug 2006, 22:26
LanciaStratos's Avatar
LanciaStratos LanciaStratos is offline
 
Join Date: Oct 2001
I've got to echo what others have said here - this is an outstanding integrated feature of vBulletin that deserves a LOT more attention. Finding this thread has saved me a few hours of coding and testing, and like they say, time is money. Spread the word on this great feature, guys, and many thanks to utw for bringing this up!!!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 16:17.

Layout Options | Width: Wide Color: