Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 11 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : MODSonline
Category: General
General chat.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: PHP-Nuke Module Editing
amr12391
General Member
Since: Feb 17, 2005
Posts: 401
Last: Mar 26, 2006
[view latest posts]
Level 5
Category: General
Posted: Tuesday, Mar. 21, 2006 11:40 am
Hello everyone [wave]

Ive been noticing that php nuke has forums and when you open the module for those forums you don't have the right side blocks anymore.. if this is the case then i would like to add a link at the top that says home and make the left blocks disappear. I don't know exactly if there is a general file that will change all module setup, or if there is a file for each module that you can change what blocks show and which ones don't.. im sure foyleman can give me some hep bcuz heknows alot of coding with php and i don't know as much as him. Im not a noob at this tho:). heres my site.. click forums while you read this and you will understand http://www.adam.62m.net/nuke

i edited it bcuz the link didn't work :)
still don't work please just copy and paste it :)

edited on Mar. 21, 2006 06:41 am by amr12391

edited on Mar. 21, 2006 07:29 am by foyleman
Share |
foyleman
Preferred PLUS Member
Since: Nov 7, 2001
Posts: 95762
Last: Apr 13, 2021
[view latest posts]
Level 10
Admin
Forum Moderator
Im a fan of MODSonair
Im a HOST of MODSonair
Category: General
Posted: Tuesday, Mar. 21, 2006 12:34 pm
I will bet the reason for this is because they know the page would be too wide. It looks like the forums are set to a specific width.

There should be something in your theme pages that tells the system not to use the right side blocks when the forums are loaded. It's been a little over year since I looked at the code so I don't really remember what it is that you need to look for.

The only example code I have is froma website that uses autothemes. If you send me your theme (the folder and contents.. I don't need any images) then I will look to see if I can find the code that basically says, "if mod == Forums then don't show right blocks".
Go ahead... You Play I Mod : Support Modsonline by becoming a PREFERRED MEMBER today!
Have you heard the MODSonair Podcast?:
MODSonair is a weekly podcast bringing you the news from a modders perspective.
Tune in every Sunday at 12pm EST to listen LIVE.
Quake 4 Mods for Dummies - Half-Life 2 Mods for Dummies
Share |
amr12391
General Member
Since: Feb 17, 2005
Posts: 401
Last: Mar 26, 2006
[view latest posts]
Level 5
Category: General
Posted: Wednesday, Mar. 22, 2006 12:22 am
that would be nice of you foyleman but ill try to look at it myself 1st to save you some time [drink] im not greedy [wink]
Share |
amr12391
General Member
Since: Feb 17, 2005
Posts: 401
Last: Mar 26, 2006
[view latest posts]
Level 5
Category: General
Posted: Wednesday, Mar. 22, 2006 12:34 am
:( i can't figure it out but i hope you can.. and anyone who thinks they can take this theme ur wrong bcuz i included no images!! heheehee lol ... heres linky http://www.adam.62m.net/downloads/theme.zip
Share |
foyleman
Preferred PLUS Member
Since: Nov 7, 2001
Posts: 95762
Last: Apr 13, 2021
[view latest posts]
Level 10
Admin
Forum Moderator
Im a fan of MODSonair
Im a HOST of MODSonair
Category: General
Posted: Wednesday, Mar. 22, 2006 12:58 am
hmm.. tough one with just this much info.

I think the problem is here:
Code:
function themefooter() {
     global $index, $foot1, $banners, $foot2, $foot3, $foot4;
/************************************************************/
/* banners are set with openbox function on the footer, if  */
/* you like to have it on the header you can do that as well*/
/************************************************************/

    if ($index == 1) {
	$tmpl_file = "themes/XDuty/left_center.html";
	$thefile = implode("", file($tmpl_file));
	$thefile = addslashes($thefile);
	$thefile = "\$r_file=\"".$thefile."\";";
	eval($thefile);
	print $r_file;
	blocks(right);
    }


This is part of your theme.php file starting line 159. I think that the Forums module is setup so that index != 1. This means that you get no right column. I don't know where this is set. That's the problem.

It's possible that you could solve it by changing the lines like so:
Code:
function themefooter() {
     global $index, $foot1, $banners, $foot2, $foot3, $foot4, $name;
/************************************************************/
/* banners are set with openbox function on the footer, if  */
/* you like to have it on the header you can do that as well*/
/************************************************************/

    if ($index == 1 AND name != 'Forums') {
	$tmpl_file = "themes/XDuty/left_center.html";
	$thefile = implode("", file($tmpl_file));
	$thefile = addslashes($thefile);
	$thefile = "\$r_file=\"".$thefile."\";";
	eval($thefile);
	print $r_file;
	blocks(right);
    }


Note that I changed two lines. Line 160 and line 166... those would be these two lines:
Code:
     global $index, $foot1, $banners, $foot2, $foot3, $foot4, $name;
    if ($index == 1 AND name != 'Forums') {


I hope it works for ya.
Go ahead... You Play I Mod : Support Modsonline by becoming a PREFERRED MEMBER today!
Have you heard the MODSonair Podcast?:
MODSonair is a weekly podcast bringing you the news from a modders perspective.
Tune in every Sunday at 12pm EST to listen LIVE.
Quake 4 Mods for Dummies - Half-Life 2 Mods for Dummies
Share |
foyleman
Preferred PLUS Member
Since: Nov 7, 2001
Posts: 95762
Last: Apr 13, 2021
[view latest posts]
Level 10
Admin
Forum Moderator
Im a fan of MODSonair
Im a HOST of MODSonair
Category: General
Posted: Wednesday, Mar. 22, 2006 01:00 am
Sorry for all those html line breaks in the second two CODE boxes. Those shouldn't be there. Looks like I will have to work onthe CODE bbcode again when I get the chance.
Go ahead... You Play I Mod : Support Modsonline by becoming a PREFERRED MEMBER today!
Have you heard the MODSonair Podcast?:
MODSonair is a weekly podcast bringing you the news from a modders perspective.
Tune in every Sunday at 12pm EST to listen LIVE.
Quake 4 Mods for Dummies - Half-Life 2 Mods for Dummies
Share |
amr12391
General Member
Since: Feb 17, 2005
Posts: 401
Last: Mar 26, 2006
[view latest posts]
Level 5
Category: General
Posted: Wednesday, Mar. 22, 2006 01:02 am
lol it doesn't work .. now i have nuthin but a white page lol... well thx for tryin i guess ill have to deal with it lol.


does this

Code:
    if ($index == 1) {
	$tmpl_file = "themes/XDuty/left_center.html";
	$thefile = implode("", file($tmpl_file));
	$thefile = addslashes($thefile);
	$thefile = "\$r_file=\"".$thefile."\";";
	eval($thefile);
	print $r_file;
	blocks(right);
    }


the blocks(right); meaning to tell it NOT to show them?
if so wouldn't this work?

Code:
    if ($index == 1) {
	$tmpl_file = "themes/XDuty/left_center.html";
	$thefile = implode("", file($tmpl_file));
	$thefile = addslashes($thefile);
	$thefile = "\$r_file=\"".$thefile."\";";
	eval($thefile);
	print $r_file;
	blocks(right);
        blocks(left);
    }



edited on Mar. 21, 2006 08:06 pm by amr12391
Share |
amr12391
General Member
Since: Feb 17, 2005
Posts: 401
Last: Mar 26, 2006
[view latest posts]
Level 5
Category: General
Posted: Wednesday, Mar. 22, 2006 01:14 am
started on line 133 this code will get you no left blocks.. hopefully
this will be my first phpnuke coding if this works

echo "";
$tmpl_file = "themes/XDuty/header.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
if ($name=='Forums') {
}
else {
blocks(left);
}

$tmpl_file = "themes/XDuty/left_center.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;

The stuff in bold was changed from blocks(left);


then find global $user, $banners, $sitename, $slogan, $cookie, $prefix and make it

global $user, $banners, $sitename, $slogan, $cookie, $prefix, $name;



edited on Mar. 21, 2006 08:18 pm by amr12391
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : MODSonline : General

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»