PDA

View Full Version : How To Make Custom Pages Like MyBOBBA



Snex
19-11-2007, 09:10 PM
Now you may be wondering how to do this. Well it is actually easier than you think it is. This MOD requires no plugins however the only way in which you can edit it is by file. The reason for this is I find it is easier to use than the admin panel as it means that you can include PHP, Javascript or whatever else you want.

The code is as follows:

<?php
$curdir = getcwd ();
chdir('/LINK TO/public_html/forum');
require_once('/LINK TO/public_html/forum/global.php');
chdir ($curdir);

echo $headinclude;
echo $header;
echo $navbar;

?>

Your Content

<?php

echo $footer;

?>
On this page you can use lots of different codes which can show things like the persons user names or even limit it to certain usergroups - This is located here. (http://www.habforum.com/codes.php)

Also, you can use any css which is included in your forum skin for instance .tcat etc.

Please note that this content will be designed inside your forum design and can have anything included on the page as the coding inside the page is not related to the forum installation.

ยป Snex - Either PM me or add my MSN [email protected] for support.

Postage
19-11-2007, 09:39 PM
Im guessing u rename

chdir('/blah/public_html/);
require_once('/blah/public_html/global.php');

to the place it actually is?

so to something like

chdir('/wolf/public_html/);
require_once('/wolf/public_html/global.php');

??

i do that and its:


Parse error: syntax error, unexpected T_GLOBAL in /home/wolf/public_html/box.php on line 4

also: http://www.habforum.com/codes.php not working.

adamFTW
19-11-2007, 09:47 PM
Oh, wow. Thanks.

The only thing is that the link doesn't work.

Snex
19-11-2007, 09:52 PM
Im guessing u rename

chdir('/blah/public_html/);
require_once('/blah/public_html/global.php');

to the place it actually is?

so to something like

chdir('/wolf/public_html/);
require_once('/wolf/public_html/global.php');

??

i do that and its:


Parse error: syntax error, unexpected T_GLOBAL in /home/wolf/public_html/box.php on line 4

also: http://www.habforum.com/codes.php not working.


I really don't know what that error is but to find out what to put where the YOUR LINK is add:


<?php
echo getcwd();
?> and save it as anything. Remember to delete the /public_html on the above link first though.


Oh, wow. Thanks.

The only thing is that the link doesn't work.
I'm aware of this I just put it there for the future. I havn't done it yet.

adamFTW
19-11-2007, 09:54 PM
Any chance it will be done soon?

Snex
19-11-2007, 10:00 PM
Any chance it will be done soon?
I'll do it tommorrow. But here are a few.

To limit something to logged in users:

<?php
if ($vbulletin->userinfo['userid']!= "0")
{
?>
Logged in code.
<?php
}
else
{
?>
Non-logged in code.
<?php
}
?>

To limit to a usergroup:

<?php
if ($vbulletin->userinfo['userid'] == "USERGROUP ID")
{
?>
Shown Code
<?php
}
else
{
?>
Error
<?php
}
?>

To show a users username:

$vbulletin->userinfo['username'];

In colour:

$vbulletin->userinfo['musername'];

A users profile field:

$vbulletin->userinfo['USER FIELD ie. email, fieldX'];

Show the name defined on the footer:

$vbulletin->options['hometitle'];

iTechnical
19-11-2007, 10:03 PM
nice one snex!

adamFTW
19-11-2007, 11:09 PM
Very good, I can't wait for the rest of the codes.

Postage
20-11-2007, 08:23 PM
This don't work.

im having the same problem in and out.

I add the first code, and make it like this:


<?php
$curdir = getcwd ();
chdir('/wolf/public_html/forum');
require_once('/wolf/public_html/forum/global.php');
chdir ($curdir);

echo $headinclude;
echo $header;
echo $navbar;

?>

Your Content

<?php

echo $footer;

?>

u told me to remove the public_html tags, and add:


<?php
echo getcwd();
?>

why wont it work?

Snex
20-11-2007, 08:28 PM
This don't work.

im having the same problem in and out.

I add the first code, and make it like this:



u told me to remove the public_html tags, and add:



why wont it work?

I told you to use that code on a different link and then place that where the /LINKTO/public_html is in the link above and it should work.

adamFTW
20-11-2007, 09:15 PM
When are you planning on making that codes.php I really would lkike to see it.

adamFTW
22-11-2007, 01:00 AM
When do you plan on adding the page with the codes?

Xarea
24-11-2007, 02:19 PM
When do you plan on adding the page with the codes?

Agreed

L!nK.
24-11-2007, 04:25 PM
Agreed

just hire him on ur forum

Beau
24-11-2007, 09:13 PM
Very cool, for some reason I thought it was harder to do than this...

With the logged in code, you might want to find the vbphrase that throws out the 'You must login' error.

Want to hide these adverts? Register an account for free!