Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How people do this with sites?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Eraser
Grandmaster Cheater
Reputation: 0

Joined: 23 Jul 2008
Posts: 504
Location: http://www.youtube.com/PCtrainers

PostPosted: Tue Apr 21, 2009 7:31 am    Post subject: How people do this with sites? Reply with quote

http://www.thps-mods.com/

this is my site and as u see there are sections to the left. Now if i want to add forums section i would have to edit all of my pages i have uploaded to the website. Is there any easier way to add? Like edit something in .CSS file?
Back to top
View user's profile Send private message
SoccaBallDude
Master Cheater
Reputation: 1

Joined: 29 Aug 2008
Posts: 263

PostPosted: Tue Apr 21, 2009 2:22 pm    Post subject: Reply with quote

You could create a base template, and then attach all the desired files to it. Then any changes to the template would change the code for you in the other pages in the non-editable regions.
Back to top
View user's profile Send private message MSN Messenger
Eraser
Grandmaster Cheater
Reputation: 0

Joined: 23 Jul 2008
Posts: 504
Location: http://www.youtube.com/PCtrainers

PostPosted: Wed Apr 22, 2009 4:25 am    Post subject: Reply with quote

I tried googling how to attach everything to main template, but couldn't find anything :S Can you explain? If there's not much write to you of course
Back to top
View user's profile Send private message
SXGuy
I post too much
Reputation: 0

Joined: 19 Sep 2006
Posts: 3551

PostPosted: Wed Apr 22, 2009 6:27 am    Post subject: Reply with quote

Simple php scripting, very easy.

Create an html page that holds menu bar details, then include a php page that checks whether a certain menu item is clicked, and populates the page with the correct php script.

you can find loads of tutorials with google.
Back to top
View user's profile Send private message
shhac
Expert Cheater
Reputation: 0

Joined: 30 Oct 2007
Posts: 108

PostPosted: Wed Apr 22, 2009 7:10 am    Post subject: Reply with quote

As the previous person mentioned, using some kind of container .php as the index would enable you to seperate the html.
You could also use frames but php would be better because frames are like new instances of the rendering engine.
Example of what you might want to do:
Code:
<html><head>...</head><body>...
<?
include 'sidebar.html';
?>
...
<?
$page = basename($_GET['p']);
if($page == '' || $page == '..'){
  include 'main.html';
}elseif(file_exists($page.'.html') && $page != 'sidebar'){
  include $page.'.html';
}else{
  include 'notFound.html';
}
?>
...
</body>
</html>
Back to top
View user's profile Send private message
lil_hack3r
Cheater
Reputation: 0

Joined: 26 Dec 2007
Posts: 29
Location: In your Comps Hard drive

PostPosted: Wed Apr 22, 2009 8:05 am    Post subject: Reply with quote

Looks like a decent site.
_________________
It's not my fault that you were expecting to see a cool signature.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
~Pineapple!
Grandmaster Cheater Supreme
Reputation: 2

Joined: 27 Dec 2008
Posts: 1810
Location: The Local Library :3

PostPosted: Wed Apr 22, 2009 10:01 am    Post subject: Reply with quote

lil_hack3r wrote:
Looks like a decent site.


How is that on topic?

_________________
Killor <3
My Fast Flash SWF Downloader

Hey, Hitler, want Butt Sechs?
Back to top
View user's profile Send private message
Eraser
Grandmaster Cheater
Reputation: 0

Joined: 23 Jul 2008
Posts: 504
Location: http://www.youtube.com/PCtrainers

PostPosted: Wed Apr 22, 2009 2:12 pm    Post subject: Reply with quote

Erm.. it's a lil complicated for me.. so u saying that i should create a php file and put
Code:
<html><head>...</head><body>...
<?
include 'sidebar.html';
?>
...
<?
$page = basename($_GET['p']);
if($page == '' || $page == '..'){
  include 'main.html';
}elseif(file_exists($page.'.html') && $page != 'sidebar'){
  include $page.'.html';
}else{
  include 'notFound.html';
}
?>
...
</body>
</html>


in it?

and here:
Code:
<html><head>...</head><body>


i put my whole htm file or just the part i want to be changed?
Back to top
View user's profile Send private message
pazila
Master Cheater
Reputation: 0

Joined: 25 Apr 2007
Posts: 266
Location: Australia

PostPosted: Thu Apr 23, 2009 1:38 am    Post subject: Reply with quote

1) Copy the code which makes up your menu.

2) Stick it into a new file, such as "menu.php".

3) Replace the menu code in all your pages with "<?php include 'menu.php' ?>".

- Make sure whatever files have the above code in them are saved with the extension ".php".

- If the file was already in PHP, then don't put in the PHP tags. ("<?php" and "?>")

_________________
Back to top
View user's profile Send private message
Eraser
Grandmaster Cheater
Reputation: 0

Joined: 23 Jul 2008
Posts: 504
Location: http://www.youtube.com/PCtrainers

PostPosted: Thu Apr 23, 2009 4:20 am    Post subject: Reply with quote

OMG you're my hero man Very Happy i will rep you as soon as possible because i gave rep to someone like 2 hrs ago Very Happy
thnx pazila
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites