PDA

View Full Version : misc.php rules hack


bigdaddy04
01-10-2004, 02:31 AM
Hi everyone,
I was wondering, is there a hack for something like this:
http://hostingdiscussion.com/misc.php?s=&action=rules
Or where can I find instructions on how to achieve this?

Thanks in advance.

Zachery
01-10-2004, 02:43 AM
Hi everyone,
I was wondering, is there a hack for something like this:
http://hostingdiscussion.com/misc.php?s=&action=rules
Or where can I find instructions on how to achieve this?

Thanks in advance.
that be a simple action change, however you could use in vB3 the faq manager to accompllish it. are you using vB2 or vB3?

bigdaddy04
01-10-2004, 02:55 AM
vB2,
i know it should be simple, just a few lines added to misc.php and a new template, im just not sure of what to do exactly..

Zachery
01-10-2004, 02:56 AM
vB2,
i know it should be simple, just a few lines added to misc.php and a new template, im just not sure of what to do exactly..
if you hold on a moment ill unzip 2.3.4 and make the nessary modifactions and share them :)

Zachery
01-10-2004, 03:04 AM
first make a new template with your rules and whatever else youd like to have in there :)
make sure its called misc_rules

now

in misc.php find ?>

and add above


// ####### Rules #######
if ($action=="rules") {
$templatesused = "misc_rules";
include("./global.php");
eval("dooutput(\"".gettemplate("misc_rules")."\");");
}

i think that should be it lol ^^

bigdaddy04
01-10-2004, 03:20 AM
Wow, Thanks a bunch!!!

Zachery
01-10-2004, 05:07 AM
lemme know if theres any problems :)

bigdaddy04
01-10-2004, 04:38 PM
Hi Faranth..

I got a question, say I want to add another page, not rules, just another page to misc.php..

What is the principal of doing that?

Zachery
01-10-2004, 04:55 PM
Hi Faranth..

I got a question, say I want to add another page, not rules, just another page to misc.php..

What is the principal of doing that?same steps find ?>

add above

// ####### Page #######
if ($action=="page") {
$templatesused = "misc_page";
include("./global.php");
eval("dooutput(\"".gettemplate("misc_page")."\");");
}


change page to whatever you want, but make sure that templatesused and gettempalte are the same :)

Xenon
01-10-2004, 04:58 PM
btw. it's vb3 style, but as it's nicer than vb2's style you should use this:

eval('dooutput("' . gettemplate('misc_page') . '");');

instead of
eval("dooutput(\"".gettemplate("misc_page")."\");");

Zachery
01-10-2004, 05:02 PM
btw. it's vb3 style, but as it's nicer than vb2's style you should use this:

eval('dooutput("' . gettemplate('misc_page') . '");');

instead of
eval("dooutput(\"".gettemplate("misc_page")."\");");
i was just coppying the code from misc.php :D no need for me to try any crazy things

Xenon
01-10-2004, 05:04 PM
:)
well as bigdaddy wanted to lear something i'd say he should learn the nicer tricks ;)

bigdaddy04
01-10-2004, 05:11 PM
Thank you Xenon :)

Was wondering, I am now running vB 2.3.3, when I upgrade to vB3, will I lose all the hacks that were installed?

Zachery
01-10-2004, 05:12 PM
Thank you Xenon :)

Was wondering, I am now running vB 2.3.3, when I upgrade to vB3, will I lose all the hacks that were installed?
yes,

bigdaddy04
01-11-2004, 02:39 AM
I see, well thanks again :)