Jul 24, 2008

Content Box -- Technical Difficulties

Free Web Hosting, No Ads > General > Hosted Members Area

free web hosting

Content Box -- Technical Difficulties

Johnny
Okay guys, I need a bit of help with my new template. I'm kind of a noob at coding, so right now I'm using dreamweaver to help me along, but anyway, I've developed this template:

IPB Image

which you can see in use (somewhat), here:
http://www.plusone.trap17.com/dev2/index.html

and I'm having a bit of trouble with the content box. I want the content box to automatically stretch to fit whatever is in it, (and have the navigation box stay unstretched) which I've managed to do with some tricky slicing, but the problem is that with the stretching, I seem to have two choices:

1. The content is in a specifically sized box, with scrollbars to view the content.
2. The content is in the same box, but it has no scrollbars, which causes either cutoff content, or extra space at the end.

Also, I want to be able to have the navigation links change the content of that content box, without having to change to a new page entirely. I'm not sure if this can be done without some fancy flash or javascript or whatever though.

EDIT: Okay, I took out the iframe, and left the content box in divs/tables, but is there any way to call the content from a different file, without having to include it all in the page or use iframes? And also, I still need the last part with the navigation links.

 

 

 


Reply

rvalkass
You could load an external file into the main content box with a PHP include, if you don't mind some very simple PHP code. The only way to actually get the content to appear without changing page is with Javascript and something called Ajax, which is what GMail uses to load the pages.

You could use Javascript so that all of your content is on the page at the same time, but most of it is hidden. When you click a link you just change the properties of the different sections of text, so the current one becomes hidden and the new one is shown. This would eliminate any user that doesn't have Javascript enabled though.

Reply

Johnny
QUOTE(rvalkass @ Jun 16 2006, 12:27 AM) *

You could load an external file into the main content box with a PHP include, if you don't mind some very simple PHP code. The only way to actually get the content to appear without changing page is with Javascript and something called Ajax, which is what GMail uses to load the pages.

You could use Javascript so that all of your content is on the page at the same time, but most of it is hidden. When you click a link you just change the properties of the different sections of text, so the current one becomes hidden and the new one is shown. This would eliminate any user that doesn't have Javascript enabled though.


Thanks a lot for the php suggestion, but now I'm not completely sure I want the single-page thing...

Reasons for:
I want to have a single main template that, if edited, changes those parts of the page for the entire site.
I want to have a single content box, that I can change to reflect different pages of content, so I only have to edit a page of content, rather than a page with the template -and- content.
I want to have my content box css coded.

Reasons against:
I don't want more code than necessary.
I'm not sure if the content box would stretch properly when it loads a different content page.
I could modify the main template for each page, if needed for special cases.
One less page to deal with.
I could use a seperate css file for the whole site.

Also, I modified the template a bit (well, completely redid it, really), with a toploaded nav bar. Here's the new version, I'm not sure which one I'll use, but it'll probably be this new one:
http://plusone.trap17.com/dev3/index.html

 

 

 


Reply

shadowx
i did this once too except abit lamer! what i did was the content was stored as a SEPERATE html file and numbered eg 1.htm or given a proper name if i could be bothered!

using php i just did something like this:

CODE
<a href=modules.php?mod=1>item 1</a>


then in the php file it was basically:

CODE
<?
$module = $_POST['mod'];
$module = "$module" + ".htm";
echo "<HTML>all the html stuff goes here <start content area>";
include($module);
echo "<end content area> finish html stuff </html>";
?>


there was more to it than that because of giving people access to only certain files but that is a basic way of doing it.

Your current html stuff from your template will go between the quotes where it says: echo" ";

and the "mod=1" will change to whatever the file name is, for example if the filename of the html file is friends.html it will be
CODE
<a href=modules.php?mod=friends>Friends</a>


i dont know if that made any sense i hope it did. its really not too complicated it might look it but thats just because its pretty untidy!

Reply

Johnny
Sorry, doesn't make much sense at all. tongue.gif

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : content technical difficulties

  1. Sections And Content - Help please? (3)
  2. Content Management System (cms) - What CMS to choose... (10)
    I just looked at my remaing credits and it was only 1, so i remembered what I needed to find out. I
    need a CMS for my website! I have tried lots of CMS(s) and have had very little luck. I would
    like to know some CMS(s) that you would reccommend me to use. Some I have tried: CT2 CMS 2.0 beta
    Joomla EazyPortal and some others, I can't remember It needs the following: Themes avaliable
    Able to be hosted here Business Looking (ie; very formal) No Ad(s) Free for non-commercial use Forum
    Registration for members Administrator Please post some CMs(s) names in t...
  3. How Do You Check Mysql Info, And Act According To It's Content? - (6)
    As part of a web-game on my site, I have a php form that requires people to enter their username,
    and information about the characters they want to have in the game. All this information is stored
    into a MySQL table. I want the players to be able to visit a page where every character they have
    registered with their username can be seen. My question is simply, how can I check the values of
    the MySQL data, and act accordingly? What I need to do is check for a Username and a character
    number, and if it finds it, takes the data in that part and acts on it, eg. by showing th...
  4. Trap17 Website Building Tips For Beginners - For a non-technical beginner's first site (2)
    Now you've got your Trap17 free hosting account, what do you do with it? This is not a
    tutorial on how to use everything available on Trap17 free hosting accounts. This is just a brief
    overview to give you an idea on where to start. I am not an extremely technical person myself, I
    know a little bit of HTML and CSS, and that's about it. So this is written for a non-technical
    beginner who knows little or nothing about building websites.
    **************************************************************************************** I have not
    used any of the features ...
  5. Help With Installing A Content Management System. - Help please. (9)
    I want to install a CMS, but the problem is taht all the ones on Fantastico like PHPNuke and Xoops,
    say that it can't start installing iot because the directory Public_html already exists and need
    to be manually removed. Last time I did this. Nothing worked. Also, I could install this as an
    index directory. But would I label it html? Php? I am totally lost. Could someone give me a
    complete guide on how to install these. either way? On what I need to do istall it on either the
    main directory, or on a sub one with what extension? Thanks in advance. Moved to...
  6. Phpnuke Registration Problem - CMS : Content Management Software (4)
    when i have people register into my phpnuke website they are sent a message throu email to activate
    their account...well it doesnt seem to send. i dont know if we have to wait longer or its just
    something wrong in my administration panel. Ive had a problem lke this before but email was being
    sent...just had wrong urls for the user to click on to activate their account n i fixed it on m
    admin panel..so hopefully i can fix this problem on my admin panel aswell and another thing..i cant
    seem to b able to use html on my content, is that also something i need to fix somewher...
  7. Difficulties - Website was working, but now it is not (5)
    Hi, I was in the process of updating my phpBB forums, when suddenly my FTP told me I do not have
    sufficient priveledges to access it. Then I tried going to my site (main page), but I cannot. This
    is a picture showing the error I have: http://mrdarkgod.250free.com/error.zip Everything was
    working fine, then suddenly not. Any help would be nice, or an explanation. Oh yes, I forgot to
    mention something. I tried accessing the main page and the forums with Firefox, and that did not
    work either. I decided to change my IP using a proxy. When I went back to my site, I was ...
  8. Content Manager - (8)
    I need a content manager for my site and i need one where my site can be easily made but can put
    some html here and there but making it still lool professional. What do you guys reccomend? Thanks.
    /biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' />
    Love,
    jae-unit...
  9. Site Content Question - A question about site contents. (1)
    okay i was reviewing the TOS and i wasnt sure if some of the rules were for THIS forum or any forum
    that is created on a trap17 host. A user on my forum had an avatar with sexually explicit material
    on it. I removed it thinking the TOS didnt allow it. The user challenged me and asked for the link
    to the trap17.com TOS. I posted the link for him so he could read it and review it. Upon reading it,
    he brought to my attention that the TOS could be for the trap17.com forum and not forums created on
    the host. What say you, oh wise ones /biggrin.gif' border='0' style='ver...
  10. Is This Site Content Illegal? - Complaint Against Trap17 Hosted site. (14)
    QUOTE "Web sites promoting, making available or otherwise contributing to software piracy,
    hacking, spamming, ..." www.cokemusix.trap17.com's disclaimer it says it is not related to
    hacking, but if you go to its download section, you will find programs/filter that mess with the
    game's packet, and way of playing it So you guys can understand, I'll put some examples:
    HHincatalog.zip - This specific filter let's you buy stuffs that are NOT visible by the game.
    That means he is making visible stuffs that are NOT supposed to be bought. buysharktales.zi...



Looking for content, box, technical, difficulties

Searching Video's for content, box, technical, difficulties
advertisement



Content Box -- Technical Difficulties



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE