Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Showing self created pages in a self created page

HI,

I made a page with a submenu with 3 buttons: info , programm and articles. When you click on articles you'll see the list of articles (cat_id=x), while the submenu in top stays visibile and the same.

see for an example; http://www.sckr.nl/v2.0/viewpage.php?...?page_id=6

This is made based upon the following code
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]<div>

<table style="width: 600px;" border="1" cellspacing="0" cellpadding="4" bordercolor="#000080">

<tbody>

<tr>

<td width="25%" height="19" align="center"><a href="viewpage.php?page_id=5">Informatie</a></td>

<td width="25%" height="19" align="center"><a href="viewpage.php?page_id=6">Programma</a></td>

<td width="25%" height="19" align="center"><a href="http://www.voetbalzuid.nl/" target="_blank">Uitslagen en Stand</a></td>

<td width="25%" height="19" align="center"><a href="viewpage.php?page_id=1">Wedstrijdverslagen</a></td>

</tr>

<tr>

<td colspan="4" width="100%"><strong>Klasse: </strong>4 B</td>

</tr>

</tbody>

</table>

<br>

</div>









<?php

include LOCALE.LOCALESET."articles.php";







$cat_id = 1; //here you put the cat id from where you want to take the content



$res = 0;



$result = dbquery("SELECT * FROM ".DB_ARTICLE_CATS." WHERE article_cat_id='".$cat_id."'");



if (dbrows($result) != 0) {



$cdata = dbarray($result);



if (checkgroup($cdata['article_cat_access'])) {



$res = 1;







add_to_title($locale['global_201'].$cdata['article_cat_name']);



opentable($locale['400'].": ".$cdata['article_cat_name']);







echo "<!--pre_article_cat-->";



$rows = dbcount("(article_id)", DB_ARTICLES, "article_cat='".$cat_id."' AND article_draft='0'");



if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }



if ($rows != 0) {







$result = dbquery("



SELECT ta.article_id, ta.article_subject, ta.article_snippet, ta.article_datestamp



FROM ".DB_ARTICLES." ta



WHERE article_cat='".$cat_id."'



AND article_draft='0'



ORDER BY ".$cdata['article_cat_sorting']."



LIMIT ".$_GET['rowstart'].",".$settings['articles_per_page']);







$numrows = dbrows($result); $i = 1;



while ($data = dbarray($result)) {



if ($data['article_datestamp'] + 604800 > time() + ($settings['timeoffset'] * 3600)) {



$new = "&nbsp;<span class='small'>[".$locale['402']."]</span>";



} else {



$new = "";



}



echo "<a href='".FUSION_SELF."?article_id=".$data['article_id']."'>".$data['article_subject']."</a>$new<br />\n".stripslashes($data['article_snippet']);



echo ($i != $numrows ? "<br /><br />\n" : "\n"); $i++;



}



echo "<!--sub_article_cat-->";







closetable();







if ($rows > $settings['articles_per_page']) echo "<div align='center' style=';margin-top:5px;'>\n".makepagenav($_GET['rowstart'], $settings['articles_per_page'], $rows, 3, FUSION_SELF."?cat_id=".$_GET['cat_id']."&amp;")."\n</div>\n";



} else {



echo "<div style='text-align:center'>".$locale['403']."</div>\n";



echo "<!--sub_article_cat-->";



closetable();



}



}



}



if ($res == 0) { redirect(FUSION_SELF); }

?>[/syntaxhighlighter]


however, how do I alter this code to also show self created pages (for instance; http://www.sckr.nl/v2.0/viewpage.php?page_id=6) in a self created page without loosing the menu?

this way the member can create their own pages without ****ing up my menu code
I tried an iframe, however the iframe shows the entire page http://www.sckr.nl/v2.0/viewpage.php?page_id=21 (so also all the menu's , panels etc) in the frame

but i only want to show the information in the page ( viewpage.php?page_id=24) in the iframe

my code is
<?php
echo "<iframe width='100%' height='800' src='http://www.sckr.nl/v2.0/viewpage.php?page_id=24' frameborder='no'>Frames Not Supported</iframe>";
?>


somebody know's another solution?
You must add another page. Without theming.
ehm, how do you mean?

so still use the iframe?
and what other page? how do i create it?

Because I want the users to use tinymc for editing this page
Thread Information
Author
Replies
4 posts
Views
1,191 times
Last Post
Last updated on 9 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Ivoht, PolarFox