Jump to content

Holsey

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Holsey's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks but that didn't work, it just made the information invisible, not the box.
  2. Okay so this code (not php, but i need php to make it all work) that when you click on the link it shows information below it. Example: Hello <<Clicked On Hello is an english word for greeting people <<information Well the links that you can click on are in a box that goes with the template and so is the information, but i want it so when a link hasn't been clicked on the box where the information would show is invisible then when you click on the link it shows up with the information inside the box. <h2>Information Shower</h2> <div class="box"><div class="box2"> <div id="loadarea2" style="width: 205px"> </div></div> </div> So there's the box with the information inside but when you first load the page the box is empty until a link above is clicked on, i have no idea how to make it so the box doesn't show until a link is clicked. Help please.
  3. Okay, so i am not sure really if this is in the right forum but maybe someone can still help. So i have a website and a forum but my forum looks like it is on a completely different site, because it has two different templates, like this website does. But some sites, have the forum basically built in the site, so when you go to the forum, the forum template is no different then the site template
  4. <?php function getNewsList(){ $fileList = array(); if ($handle = opendir("news")) { // Read all file from the actual directory while ($file = readdir($handle)) { if (!is_dir($file)) { $fileList[] = $file; } } } rsort($fileList); return $fileList; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html> <body> <div id="main"> < <table width="100%"> <?php $list = getNewsList(); foreach ($list as $value) { $newsData = file("news/".$value); $newsTitle = $newsData[0]; $submitDate = $newsData[1]; unset ($newsData['0']); unset ($newsData['1']); $newsContent = ""; foreach ($newsData as $value) { $newsContent .= $value; } echo "<div class=\"title\">". $newstitle ."</div><div class=\"date\">" . $submitDate . "</div>"; echo "<div class=\"newsarea\">".$newsContent."</br></hr size='1'></div>"; } ?> </table> </div> </body>
  5. Hello, i am fairly new to php and i'm working on my site, I'm installing a new poster to my site but I'm trying to install it into a template... this is the entire php script (except the admin.php part) <?php function getNewsList(){ $fileList = array(); if ($handle = opendir("news")) { // Read all file from the actual directory while ($file = readdir($handle)) { if (!is_dir($file)) { $fileList[] = $file; } } } rsort($fileList); return $fileList; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html> <body> <div id="main"> < <table width="100%"> <?php $list = getNewsList(); foreach ($list as $value) { $newsData = file("news/".$value); $newsTitle = $newsData[0]; $submitDate = $newsData[1]; unset ($newsData['0']); unset ($newsData['1']); $newsContent = ""; foreach ($newsData as $value) { $newsContent .= $value; } echo "<div class=\"title\">". $newstitle ."</div><div class=\"date\">" . $submitDate . "</div>"; echo "<div class=\"newsarea\">".$newsContent."</br></hr size='1'></div>"; } ?> </table> </div> </body> the first div: title is where the title goes on the template,however on the template it is just regular so i would have to edit index.php to update the news, and if i don't have much time i want to be able to just login to a admin.php page and change the news and have the template still looking good. The date div is where the date is and the news area is whre the news goes, then theres the $newscontent $newstitles and $submitdate all that jazz. and when i run the page i get an error that says:Parse error: syntax error, unexpected T_CLASS, expecting ',' or ';' in /thisiswheremywebsitepagesare/ on line 105. line 105 is: echo "<div class=\"newsarea\">".$newsContent."</br></hr size='1'></div>"; please tell me what to do, im so confused
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.