xboxscene.org forums

Author Topic: Webdesign Help  (Read 78 times)

isoMonger

  • Archived User
  • Newbie
  • *
  • Posts: 23
Webdesign Help
« on: March 22, 2003, 11:13:00 PM »

I'm tryin to make my menu easy to change.  I just wanna change it in one place, not on about 1000 pages, which is where its at right now.  So i figured i do one last major change so that future changes will be easier.  I really only want to use javascript, i can't use flash or java, flash because of a "lowest common denominator" factor, and java, cause i don't understand it well, and neither would the person i'd hand this project over to once i perfected the template.  I would like to make a script for the menu(which will use tables and values of them) to be completely seperate and somethin that i can just embed or something like that.  This way i can change the script and the values and the urls on one page and it will change it for all of them.  I can do the script, i just want to do it seperate from the page.  Has anyone done anything like with with javascript?
Logged

MartialXboxArtist

  • Archived User
  • Sr. Member
  • *
  • Posts: 364
Webdesign Help
« Reply #1 on: March 22, 2003, 11:50:00 PM »

Use Frames..
Logged

isoMonger

  • Archived User
  • Newbie
  • *
  • Posts: 23
Webdesign Help
« Reply #2 on: March 23, 2003, 12:07:00 AM »

:jester: frames? too easy, looks like crap, i know some people can do them good, but ehh, not the look i'm goin for.
Logged

Mage

  • Archived User
  • Sr. Member
  • *
  • Posts: 482
Webdesign Help
« Reply #3 on: March 23, 2003, 12:23:00 AM »

Just use php or asp so you literally do have a templete.
So you change your templete and it takes effect on every page.
Logged

isoMonger

  • Archived User
  • Newbie
  • *
  • Posts: 23
Webdesign Help
« Reply #4 on: March 23, 2003, 08:18:00 AM »

can php use like two different files to make one page.   Like have my menu in one file and then the rest of the content on another.

oh, i know someone posted that cool php script, but i lost it, if that someone would like to post it again, that'd be great.

This post has been edited by isoMonger: Mar 23 2003, 04:19 PM
Logged

gainpresence

  • Archived User
  • Hero Member
  • *
  • Posts: 940
Webdesign Help
« Reply #5 on: March 23, 2003, 08:22:00 AM »

Here's a repost:

CODE

$ext = ".htm"; // The extension of the pages to be included
$template = "template.htm"; // the location of the template page
$default = "main.htm"; // Location of the default page (when no PID is set)

// If a page (PID) is set, include it inside the template file
if (isset($pid)) {
$p = "$pid$ext";
$src = &$p;
}

// Shows a default page
else {
$src = &$default;
}

// includes the template file
include ("$template");

?>



^Name that file "index.php", make sure you delete all other indexes.

Now, include the below code in your template page (wherever you want the content to appear):

CODE


Now, go to http://www.yoursite.com/(index.php), it should show the default page (template.htm with main.htm included originally).

Type http://www.yoursite.com/?pid=what, and it'll include "what.htm" into the template file.. Get it?

If anyone decides to use it, give me some credit, eh?   :beer:

You can include that line ANYWHERE in the template.htm file, under frames, in layers, tables, anything, and it'll work..

This post has been edited by gainpresence: Mar 23 2003, 04:25 PM
Logged

msnyder

  • Archived User
  • Full Member
  • *
  • Posts: 163
Webdesign Help
« Reply #6 on: March 23, 2003, 08:47:00 AM »

You any good at Flash? If not check into Cold Fusion or Dreamweaver...
Logged

gainpresence

  • Archived User
  • Hero Member
  • *
  • Posts: 940
Webdesign Help
« Reply #7 on: March 23, 2003, 08:51:00 AM »

Ah, yes, you could also "inverse" that script, and just include the menu into your pages..

CODE
Logged

ULTIMATEGAMER12

  • Archived User
  • Newbie
  • *
  • Posts: 43
Webdesign Help
« Reply #8 on: March 23, 2003, 09:18:00 AM »

i use php for my site and for my fusion news. Works great!
Logged

isoMonger

  • Archived User
  • Newbie
  • *
  • Posts: 23
Webdesign Help
« Reply #9 on: March 23, 2003, 09:21:00 AM »

i probably just need to go out and buy a book about php, but does this stuff work like frames.  Where basically you have your template set up and then specify a location where all your content changes.  And when you link to other stuff, does it just the content part change?  I'm still kinda confused on what goes where.  Do you have a very basic page in action i could check out?  You could use css w/ this stuff too right?
Logged

ULTIMATEGAMER12

  • Archived User
  • Newbie
  • *
  • Posts: 43
Webdesign Help
« Reply #10 on: March 23, 2003, 09:25:00 AM »

no books dont give shit...

do u know html?

If you do all you do is

Insert your content on a blank page
to link it use main.php?id=whatever.html
You put a code where you want the content to go

CODE


Leave the content on the main page blank and create another page for eg. news.php

If you want I could maybe install Fusion News for ya
Logged

gainpresence

  • Archived User
  • Hero Member
  • *
  • Posts: 940
Webdesign Help
« Reply #11 on: March 23, 2003, 09:34:00 AM »

QUOTE (isoMonger @ Mar 23 2003, 12:15 PM)
i probably just need to go out and buy a book about php, but does this stuff work like frames.  Where basically you have your template set up and then specify a location where all your content changes.  And when you link to other stuff, does it just the content part change?  I'm still kinda confused on what goes where.  Do you have a very basic page in action i could check out?  You could use css w/ this stuff too right?

Just make any HTML page with javascript, CSS, or ANYTHING on it, leave the content part blank (besides the include $src part).
Logged

isoMonger

  • Archived User
  • Newbie
  • *
  • Posts: 23
Webdesign Help
« Reply #12 on: March 23, 2003, 12:12:00 PM »

okay, i was thinkin about it too much. sounds easy.  Hears a question though, lets say you wanted to do a site with a specific schedule that repeated from day to day, and depending on what time it was, it would show whats goin on.  I wanna use javascript to get the time and set a variable for the page to go to, but can php recognize that variable
Logged

isoMonger

  • Archived User
  • Newbie
  • *
  • Posts: 23
Webdesign Help
« Reply #13 on: March 23, 2003, 05:19:00 PM »

how do u define a cells value
like i named mine menu01, i thought it was window.document.menu01.value, but that's not workin.  any help would be great
thanks
Logged