You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 48 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Page Generation Code [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
KingJames
Private
Private


Joined: Feb 12, 2004
Posts: 43


PostPosted: Fri Feb 13, 2004 12:54 pm Reply with quoteBack to top

I have asked two questions here at Nukecops in the past couple days and have gotten two quick accurate answers, maybe I am pushing luck but I thought I would try for three.

What I would like to do is have the page generation code work in the 3D-Fantasy theme the same way as it does in say the Deep Blue theme. Does anyone here know how to do that?

Please give idiot proof answers if at all possible because I am still very much a newbie. Thanks.
Find all posts by KingJamesView user's profileSend private message
sting
Site Admin
Site Admin


Joined: Jul 24, 2003
Posts: 1985

Location: Apparently ALWAYS Online. . .

PostPosted: Fri Feb 13, 2004 6:15 pm Reply with quoteBack to top

Include the code in the footer of your theme. Do you have MS-Analysis Loaded by any chance?

-sting

_________________
Is it paranoia if they are really out to get you?

-------------------------------------------------------
sting usually hangs out at nukehaven.net
Find all posts by stingView user's profileSend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN MessengerICQ Number
KingJames
Private
Private


Joined: Feb 12, 2004
Posts: 43


PostPosted: Fri Feb 13, 2004 9:19 pm Reply with quoteBack to top

Umm, I actually don't even know what that is sorry. Monday morning was my very first time installing .php nuke.

We have run .php for a long time but someone else had always set it up for me, well we were hacked by this wonderful site (I assume you don't want to link them here), who hacked about 20 other .php sites the same day and who even bragged about hacking us on their site and posted all sorts of F-bombs on our front page.

Since the site that hacked us was out of the country my hosting company said they couldn't do anything about it, the reason that I am here seeking all this assistance is the other guy who usually handles all this is a genius but he is quite ill at the moment so I jumped in and am trying to make a go of it myself. Thanks for your response, any help at all is appreciated.

I hope my friend gets well soon enough that I don't have to try sorting through the nightmare of trying to reload all of our content from the latest database backup, I might just go crazy then.


Last edited by KingJames on Sat Feb 14, 2004 5:30 am; edited 1 time in total
Find all posts by KingJamesView user's profileSend private message
chris-au
Elite Nuker
Elite Nuker


Joined: Jan 31, 2003
Posts: 717


PostPosted: Fri Feb 13, 2004 10:14 pm Reply with quoteBack to top

I will never know why they replaced php scripting with html.
In php files one can do anything.
Not that one can't include php within html scripts but when they than again translates html back into php, like they did in 3D-Fantasy and other themes, that is absolutely silly.

In themes they had a ball of a time to do that.

I still don't know why they do not stick with php scripting.
Maybe there is a good reason for that but I would like to hear that explain.

OK for 3D-Fantasy.

You have to change the footer.html to a footer.php and change it a tiny bit.

That footer.php should now look like:
Code:
<?php
echo "
</td></tr></table>
<br>
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr>
<td width=\"15\" height=\"15\"><img src=\"themes/3D-Fantasy/images/up-left2.gif\" alt=\"\" border=\"0\"></td>
<td background=\"themes/3D-Fantasy/images/up2.gif\" align=\"center\" width=\"100%\" height=\"15\">&nbsp;</td>
<td><img src=\"themes/3D-Fantasy/images/up-right2.gif\" width=\"15\" height=\"15\" alt=\"\" border=\"0\"></td></tr>
<tr>
<td background=\"themes/3D-Fantasy/images/left2.gif\" width=\"15\">&nbsp;</td>
<td bgcolor=\"ffffff\" width=\"100%\" align=\"center\"><font class=\"tiny\">
";
footmsg();
echo "
</font></td>
<td background=\"themes/3D-Fantasy/images/right2.gif\"></td></tr>
<tr>
<td width=\"15\" height=\"15\"><img src=\"themes/3D-Fantasy/images/down-left2.gif\" alt=\"\" border=\"0\"></td>
<td background=\"themes/3D-Fantasy/images/down2.gif\" align=\"center\" height=\"15\">&nbsp;</td>
<td><img src=\"themes/3D-Fantasy/images/down-right2.gif\" width=\"15\" height=\"15\" alt=\"\" border=\"0\"></td></tr>
</td></tr></table>";
?>


Not much changed from the html footer but never the less....

find:

Code:

function themefooter() {
    global $index, $foot1, $foot2, $foot3, $foot4;
    if ($index == 1) {
   $tmpl_file = "themes/3D-Fantasy/center_right.html";
   $thefile = implode("", file($tmpl_file));
   $thefile = addslashes($thefile);
   $thefile = "\$r_file=\"".$thefile."\";";
   eval($thefile);
   print $r_file;
   blocks(right);
    }

    $footer_message = "$foot1<br>$foot2<br>$foot3<br>$foot4";
    $tmpl_file = "themes/3D-Fantasy/footer.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;

}


Change that to:
Code:
function themefooter() {
    global $index, $foot1, $foot2, $foot3, $foot4;
    if ($index == 1) {
   $tmpl_file = "themes/3D-Fantasy/center_right.html";
   $thefile = implode("", file($tmpl_file));
   $thefile = addslashes($thefile);
   $thefile = "\$r_file=\"".$thefile."\";";
   eval($thefile);
   print $r_file;
   blocks(right);
    }
/*
    $footer_message = "$foot1<br>$foot2<br>$foot3<br>$foot4";
    $tmpl_file = "themes/3D-Fantasy/footer.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
*/
include("themes/3D-Fantasy/footer.php");

}

And there it is.

_________________
Chris


Last edited by chris-au on Sun Feb 15, 2004 5:03 pm; edited 1 time in total
Find all posts by chris-auView user's profileSend private messageVisit poster's website
VinDSL
Site Admin
Site Admin


Joined: Jul 08, 2003
Posts: 1193

Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs

PostPosted: Fri Feb 13, 2004 11:21 pm Reply with quoteBack to top

Sorry if I'm going OT, but I recently added some code that generates a lot more useful information than normal. I love this script! Thought you might be interested in it too. Click the 'WWW button' below...

Anyone else running this?

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: VinDSL's Lenon.com | The Disipal Site ::.
Find all posts by VinDSLView user's profileSend private messageVisit poster's websiteICQ Number
sengsara
Support Staff
Support Staff


Joined: Sep 18, 2003
Posts: 289

Location: Batam, Indonesia (an hour boat ride from Singapore) ;)

PostPosted: Fri Feb 13, 2004 11:27 pm Reply with quoteBack to top

Cool!
Care to share, VinDSL?

Wink

_________________
The Answer Get it now.
Batam Web Network Most likely the content of this site is not for you...
Find all posts by sengsaraView user's profileSend private messageSend e-mailVisit poster's website
chris-au
Elite Nuker
Elite Nuker


Joined: Jan 31, 2003
Posts: 717


PostPosted: Fri Feb 13, 2004 11:48 pm Reply with quoteBack to top

Quote:
useful information


If I knew how useful that would be for visitors, maybe it I might know if it is useful to display that info.
I think users are only interested in how quick the page displays all the information they require during their visit.

For the developer of the pages, yes, it could be a very good tool.

Otherwise, why add overhead?

_________________
Chris
Find all posts by chris-auView user's profileSend private messageVisit poster's website
VinDSL
Site Admin
Site Admin


Joined: Jul 08, 2003
Posts: 1193

Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs

PostPosted: Sat Feb 14, 2004 4:42 am Reply with quoteBack to top

sengsara wrote:
Cool!
Care to share, VinDSL?

Wink

No problem!

I haven't completed this hack yet, but I'm using the "kc33 page gentime" for the core. Here's the URL:

http://kc33.com/portal.html?name=Downloads&d_op=viewdownloaddetails&lid=19&title=kc33_page_gentime

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: VinDSL's Lenon.com | The Disipal Site ::.
Find all posts by VinDSLView user's profileSend private messageVisit poster's websiteICQ Number
VinDSL
Site Admin
Site Admin


Joined: Jul 08, 2003
Posts: 1193

Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs

PostPosted: Sat Feb 14, 2004 4:58 am Reply with quoteBack to top

chris-au wrote:
...why add overhead?

Well, first of all, 'Page Generation' time is a misnomer. 'Page Generation' time depends largely on YOUR Internet connection, CPU speed, graphic card, processes running in the background of your PC, yada, yada, yada, so I never liked that term. What you are actually measuring is 'Script Generation' time on the server. Further, this code breaks the 'Script Generation' time down into percentages by PHP and sql database, which is somewhat interesting. The best part, for me, is the sheer number of queries required to generate the script. This is very enlightening, for both users and developers IMHO.

This type of information is displayed in IPB forums for all users to see, and everyone seems to like IPB, so I thought it would be cool to display it in PHP-Nuke too... Wink

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: VinDSL's Lenon.com | The Disipal Site ::.
Find all posts by VinDSLView user's profileSend private messageVisit poster's websiteICQ Number
KingJames
Private
Private


Joined: Feb 12, 2004
Posts: 43


PostPosted: Sat Feb 14, 2004 6:12 am Reply with quoteBack to top

Wow, thanks for all the responses people although as you can imagine most of the advanced info is way over my head.

The good thing about being ignorant like I am though is it is unlike being stupid, being ignorant is a temporary condition.

I also agree this is a good place for info, it was suggested to me from one of my readers who had some pity on me when he saw that we were hacked.


Last edited by KingJames on Sat Feb 14, 2004 6:53 am; edited 1 time in total
Find all posts by KingJamesView user's profileSend private message
sting
Site Admin
Site Admin


Joined: Jul 24, 2003
Posts: 1985

Location: Apparently ALWAYS Online. . .

PostPosted: Sat Feb 14, 2004 6:42 am Reply with quoteBack to top

Quote:

Since the site that hacked us was out of the country my hosting company said they couldn't do anything about it,


That's a load of rubbish - and one that would make me switch ISP's pretty fast. The ISP should at the very least be able to provide logs, etc from the machine that was hacked. You might have to take that to a higher level though for that. Contact your local FBI if you really want to pursue it. They have persuasive ways of asking your ISP to assist.

-sting

_________________
Is it paranoia if they are really out to get you?

-------------------------------------------------------
sting usually hangs out at nukehaven.net
Find all posts by stingView user's profileSend private messageVisit poster's websiteAIM AddressYahoo MessengerMSN MessengerICQ Number
KingJames
Private
Private


Joined: Feb 12, 2004
Posts: 43


PostPosted: Sat Feb 14, 2004 6:50 am Reply with quoteBack to top

That did it. One more funny comment. It took me about 10 minutes of getting a pars error code in line 22, must mean that Not much changed from the html footer but never the less.... was a comment and didn't actually belong in the final code. Embarassed
Find all posts by KingJamesView user's profileSend private message
KingJames
Private
Private


Joined: Feb 12, 2004
Posts: 43


PostPosted: Sat Feb 14, 2004 6:59 am Reply with quoteBack to top

I will keep that in mind for next time, since it has been almost a week this time, I would imagine that too much time has passed.
Find all posts by KingJamesView user's profileSend private message
sengsara
Support Staff
Support Staff


Joined: Sep 18, 2003
Posts: 289

Location: Batam, Indonesia (an hour boat ride from Singapore) ;)

PostPosted: Sat Feb 14, 2004 8:38 pm Reply with quoteBack to top

VinDSL wrote:
I haven't completed this hack yet,

Since you already start doing it I think I'll just wait for the final result.

_________________
The Answer Get it now.
Batam Web Network Most likely the content of this site is not for you...
Find all posts by sengsaraView user's profileSend private messageSend e-mailVisit poster's website
VinDSL
Site Admin
Site Admin


Joined: Jul 08, 2003
Posts: 1193

Location: Arizona (USA) Site Admin: Lenon.com Admin: Disipal Designs

PostPosted: Sun Feb 15, 2004 4:09 am Reply with quoteBack to top

sengsara wrote:
VinDSL wrote:
I haven't completed this hack yet,

Since you already start doing it I think I'll just wait for the final result.

Okay, I'll keep working on it. I don't know if you checked it out, but... While the concept is excellent, the original code is somewhat kludgey (no flame intended to kc33).

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: VinDSL's Lenon.com | The Disipal Site ::.
Find all posts by VinDSLView user's profileSend private messageVisit poster's websiteICQ Number
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.947 Seconds - 359 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::