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)

miner 11-07-2012 05:58 AM

Nice article.

Lynne 11-07-2012 05:09 PM

Quote:

Originally Posted by aryung (Post 2379045)
i am waiting for response according to non registered / not logedin users permissions

I don't understand your question. We have covered code for conditions based on members versus guests viewing the page. I'd suggest reading through the thread or using the Search option for the thread.

mokujin 11-09-2012 09:56 AM

Quote:

i do not need to do anything with test.php i put my Text Here
Code:

<h2 class="blockhead">Title</h2>
    <div class="blockbody">
      <div class="blockrow">
        Our Forum is Private to our Academy Students Only
      </div>
    </div>


I think this article help you: https://vborg.vbsupport.ru/showthread.php?t=231525

aryung 11-17-2012 05:46 PM

Thanks Mokujin for the link but this would not help me
as i did this on first attempt
though worked fine but messed

however i achieve with
PHP Code:

define('THIS_SCRIPT''register'); 


mokujin 11-18-2012 01:34 PM

Quote:

Originally Posted by aryung (Post 2381978)
Thanks Mokujin for the link but this would not help me
as i did this on first attempt
though worked fine but messed

however i achieve with
PHP Code:

define('THIS_SCRIPT''register'); 


You know I really dont understand what you have with register.php file?
Lets say you are the administrator and your usergourpid is 6, right?
New members who registered have usergroupid 2 .
And your students, you will have to move them to an another usergroup, lets say usergroupid is 15

And your file test.php will allow your students (and yourself) to access it - test.php file?

aryung 11-20-2012 04:56 AM

Actually if some one is already registered he is not restricted to access forum

PHP Code:

define('THIS_SCRIPT''register'); 

if registered user visit register.php it will say you already a member go login and if guest it will load registration page

on my test.php
if user is loged in in it will load some instructions because i cant say "you are restricted" to those whom are not restricted.

and if guest test.php will tell why you are restricted to access

that's why i use this script 'register'
if condition works fine for content load but create problems when i add some input fields for guests
Code:

<vb:if condition="$show['guest']">Show this to guest only</vb:if>

richardevans123 01-03-2013 01:13 PM

I have a problem, when I load the page, it logs me out, and when I log in, it gives me an invalid redirect.

Any way to resolve this? Thanks

Lynne 01-04-2013 02:02 AM

Quote:

Originally Posted by richardevans123 (Post 2394480)
I have a problem, when I load the page, it logs me out, and when I log in, it gives me an invalid redirect.

Any way to resolve this? Thanks

Can we get a link to the page and a test username/password.

GameOverViper 01-25-2013 09:17 PM

How would I go about making a new page layout like this for a sub-domain?

Lynne 01-26-2013 12:53 AM

Quote:

Originally Posted by GameOverViper (Post 2399547)
How would I go about making a new page layout like this for a sub-domain?

I'm not sure what you mean.

GameOverViper 01-26-2013 11:42 PM

Quote:

Originally Posted by Lynne (Post 2399581)
I'm not sure what you mean.

Say I want to take the domain Xbox360Clans.net and make a page on vbulletin with blackops2.xbox360clans.net. How do I go about doing this so that the sub-domain works with the site?

Lynne 01-27-2013 03:12 AM

Quote:

Originally Posted by GameOverViper (Post 2399756)
Say I want to take the domain Xbox360Clans.net and make a page on vbulletin with blackops2.xbox360clans.net. How do I go about doing this so that the sub-domain works with the site?

I guess that depends on how you set up the sub-domain. But, I really don't know. Did you try the script? Make sure the include is pointing to the correct place? Check your error_logs?

RisingGlow 02-03-2013 04:18 AM

How do I make it so the page is restricted to usergroups?

Digital Jedi 02-03-2013 04:43 AM

Quote:

Originally Posted by RisingGlow (Post 2401509)
How do I make it so the page is restricted to usergroups?

Check page 19 of this thread.

richardevans123 02-03-2013 11:14 AM

Quote:

Originally Posted by Lynne (Post 2394607)
Can we get a link to the page and a test username/password.

The Custom Code I'm using is under "http://holodeck.section31rp.com/forms.php"

And I'm logged in on the main forums, but not here on my custom page. (Note: I am editing this file to use with a mod. I have got the main file for creating forms - but i've added
PHP Code:

chdir ('/home/******/public_html/'); 

to make it work)

Thanks

fxdigi-cash 02-25-2013 04:34 AM

great article, Thanks Lynne.

I have one question though. Say that my forum is located under www.mydomain.com/forum and I want to create a custom page with forum template, but in the main folder "out of the forum" like this www.mydomain.com/index.php

does that work? if yes, what changes I have to make, please.

Thanks in advance

Lynne 02-25-2013 06:53 PM

Quote:

Originally Posted by fxdigi-cash (Post 2406126)
great article, Thanks Lynne.

I have one question though. Say that my forum is located under www.mydomain.com/forum and I want to create a custom page with forum template, but in the main folder "out of the forum" like this www.mydomain.com/index.php

does that work? if yes, what changes I have to make, please.

Thanks in advance

I don't know if it would work since I have never tried it, sorry.

fxdigi-cash 02-27-2013 01:34 AM

Thanks again for the great tips, Lynne.

I have one more question about if it is possible to add a custom: header, navbar, footer, ...etc...

if yes, how can I achieve that?

Thanks

P.s: I'm looking for customizing independent pages with different style and design within the vb forum... would that be possible?

Digital Jedi 02-28-2013 03:52 AM

Quote:

Originally Posted by fxdigi-cash (Post 2406614)
Thanks again for the great tips, Lynne.

I have one more question about if it is possible to add a custom: header, navbar, footer, ...etc...

if yes, how can I achieve that?

Thanks

P.s: I'm looking for customizing independent pages with different style and design within the vb forum... would that be possible?

If you use the vB CSS classes, then it will match whatever skin you've created the templates in. If you're trying to use different styling, then you have to customize you're own CSS.

fxdigi-cash 02-28-2013 03:57 AM

Thanks @Digital for the great comments.

I have one more question though. If I want to use two styles at the same time indicating each custom page to use for example style 1 and other custom page use style 2, is that possible?

if yes, how to define or indicate the style to each page independently?

any idea?

Digital Jedi 02-28-2013 04:27 AM

If you're customizing your own CSS, you can do whatever you want. There's no limitations there. But if you mean using the different styles in your Style Manager, then that's a little trickier. You can just put the style ID in the link to those pages, but that would set each user's options to that style each time they visited. I know forums can be set to force use a style without doing that, but I'm unfamiliar with how to do that for a custom page.

fxdigi-cash 02-28-2013 05:10 AM

Thanks @Digital for the information.

I guess I will have to find a way to force the general style to forum pages while the custom style is used for custom pages.

now I believe I need to look around the net to digg more for this issue.

Thanks again. That was very helpful

cellarius 02-28-2013 06:59 AM

You should be able to do something like that at in a plugin on hook style_fetch
PHP Code:

if (THIS_SCRIPT == "test")
{
    
$styleid 4398;


Where 4398 of course needs to be replaced by the id of the style to be used, and THIS_SCRIPT needs to equal the constant you are setting on your custom page.

fxdigi-cash 02-28-2013 01:42 PM

Quote:

Originally Posted by cellarius (Post 2406901)
You should be able to do something like that at in a plugin on hook style_fetch
PHP Code:

if (THIS_SCRIPT == "test")
{
    
$styleid 4398;


Where 4398 of course needs to be replaced by the id of the style to be used, and THIS_SCRIPT needs to equal the constant you are setting on your custom page.

Thanks @cellarius for the information.

I found this thread also talking about the same thing I'm after: https://vborg.vbsupport.ru/showthread.php?t=267775

The one who asked the question in that thread mentioned the solution which is this code:

Code:

if (STYLEID == 1){
Code
}

And to be honest with you, my knowledge in PHP is not that good, but only html and css. so I'm wondering if you can explain where to place that code, please.

as you know in the custom page, which is html or php and the template that I can create from vb admin cp.... so where exactly should I insert that code?

looking forward to hearing from you :)

Digital Jedi 02-28-2013 06:55 PM

That particular link is not the same thing that cellarius posted. That's a plugin that would only execute when a particular style is used. Not the other way around.

In your Admin CP in Plugins & Products, you'll see the Add New Plugin option. You put the code there in a new plugin, and select the hook cellarius mentioned. You should remember what THIS_SCRIPT is, as it's what you changed one of the test lines to when you created your custom page.

brandondrury 02-28-2013 09:37 PM

Is there anything that has changed in vB4 over its progression that would cause the original code on the first page to not work?

I've used this as my starting point for an upgrade script I've had for years, but it stopped working and I'm trying to track down why.

I'm having the exact same problem on a clean local install of vBulletin.

Thanks!

Brandon

Lynne 03-01-2013 02:15 AM

There isn't anything in the first post code that has changed. If you need us to take a look at your exact code, you should make a thread in the vB4 Programming forum and post your php code and template code and let us have a link to your page so we can see what is going on.

fxdigi-cash 03-01-2013 04:05 AM

Quote:

Originally Posted by Digital Jedi (Post 2407052)
That particular link is not the same thing that cellarius posted. That's a plugin that would only execute when a particular style is used. Not the other way around.

In your Admin CP in Plugins & Products, you'll see the Add New Plugin option. You put the code there in a new plugin, and select the hook cellarius mentioned. You should remember what THIS_SCRIPT is, as it's what you changed one of the test lines to when you created your custom page.

Thank you so much @Digital.

That was clear.

I followed the steps you mentioned, but it seems there is something wrong with the style. I have tested the style on vb pages, but the custom page shows weird styling.... :confused:
it is like interaction between main style and other style.

by the way, in your code
Code:

if (THIS_SCRIPT == "test")
{
    $styleid = 4398;
}

"test" is for what?? is it customized page name or customized template name? sounds to me it is a page name ;)

any idea what's going on here?

Thanks

Digital Jedi 03-01-2013 04:38 AM

Remember in your custom page, where you changed the text in green?
Quote:

Originally Posted by Lynne (Post 1915364)
define('THIS_SCRIPT', 'test');

That's THIS_SCRIPT. Whatever you changed test to, is what you use in the plugin.

Can you link us to your page so we can see exactly what you mean by interacting?

fxdigi-cash 03-01-2013 06:21 AM

Quote:

Originally Posted by Digital Jedi (Post 2407131)
Remember in your custom page, where you changed the text in green?

That's THIS_SCRIPT. Whatever you changed test to, is what you use in the plugin.

Can you link us to your page so we can see exactly what you mean by interacting?

ok, great. Thanks again.

for the style, I made actually a little mistake.... forgot to clear the browser cache and that's why the style was messy.... :D

Thanks again. That was very helpful

P.S: I found here at vbulletin.org a mod that let admin to use a global custom footer, any idea if this can replace $footer or {vb:raw footer}

brandondrury 03-01-2013 07:59 PM

Thanks for the help. It turns out that it was a strange pathway issue in both situations. I'm not sure how that changed on my site, but I've got it working. Thanks for the swift help!

Brandon

BigAl205 03-04-2013 12:36 PM

I run two forums hosted on two different servers. Is there a way to use this modification to pull the activity stream from the other forum?

I tried doing an RSS feed, but I would have to have a feed for every subforum, unless someone know how to feed the whole forum.

BigAl205 03-23-2013 09:17 AM

I figured out how to do the feed for the whole forum, but it will create a new thread for every thread posted on the other forum. I just want a page or side block on site A showing "What's new on site B". Any ideas would be appreciated.

Lynne 03-23-2013 04:00 PM

Quote:

Originally Posted by BigAl205 (Post 2411713)
I figured out how to do the feed for the whole forum, but it will create a new thread for every thread posted on the other forum. I just want a page or side block on site A showing "What's new on site B". Any ideas would be appreciated.

This isn't an article on creating a sideblock. If you want to just have a sideblock, then go to: vboptions > forum sidebar > set those to what you want
forums & moderators > forum blocks > add the blocks you want

So, create a php block and put your code in there.

BigAl205 03-24-2013 12:53 AM

Quote:

Originally Posted by BigAl205 (Post 2411713)
I figured out how to do the feed for the whole forum, but it will create a new thread for every thread posted on the other forum. I just want a page or side block on site A showing "What's new on site B". Any ideas would be appreciated.

Quote:

Originally Posted by Lynne (Post 2411775)
This isn't an article on creating a sideblock. If you want to just have a sideblock, then go to: vboptions > forum sidebar > set those to what you want
forums & moderators > forum blocks > add the blocks you want

So, create a php block and put your code in there.

Perhaps I should have emphasized that I want a page to do this and If I can't have that, I will attempt a side block. My problem is that I don't know how to pull the activity stream from another forum on a different server.

cellarius 03-24-2013 09:52 AM

Which still has nothing whatsoever to do with this tutorial.

ar15dcm 05-01-2013 11:02 PM

Yes I am a noob...

In which file do I add the code so users on the page display properly in the whos online?

Lynne 05-01-2013 11:05 PM

Quote:

Originally Posted by ar15dcm (Post 2419513)
Yes I am a noob...

In which file do I add the code so users on the page display properly in the whos online?

It's covered in the article on page 1.

ar15dcm 05-01-2013 11:12 PM

Okay I will look again...

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

Is this the file? where is it located? what is the file extension?

Quote:

1. hook location - online_location_process:
--------------- Added [DATE]1367454121[/DATE] at [TIME]1367454121[/TIME] ---------------

Can you please point out it says where you are supposed to place the code? I am not a code wizard and I'm really trying to learn this stuff. I think sometimes it gets forgotten that there are newbies on the site.

Lynne 05-02-2013 02:14 AM

You use the plugin system which is documented in the manual here - http://www.vbulletin.com/docs/html/p...rsion=40200603


All times are GMT. The time now is 05:20 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.02944 seconds
  • Memory Usage 1,853KB
  • 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
  • (6)bbcode_php_printable
  • (20)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