custom pages (General)

by icencrime, Monday, November 15, 2010, 13:00 (4914 days ago)
edited by icencrime, Monday, November 15, 2010, 13:43

hi everyone,

i'm starting to use, "my little forum". i like it. it is really really good and most different forum script i've ever seen.

now, i want MLF more different..

i'm tryin to create a new .php page. fox exaple; hermano.php

i want MLF header, footer and user system but for hours i've got nothing.

some help would be nice.

i need really really flexbly, html use page.

custom pages

by icencrime, Monday, November 15, 2010, 19:31 (4914 days ago) @ icencrime

please!

all i need is MLF header including on my own script.

custom pages

by Riba ⌂, Friday, November 26, 2010, 15:08 (4903 days ago) @ icencrime

Hello icencrime,

Here are some guidelines how to do it:
Edit the index.php in the root and add something like:

  case 'yourpage':
     include('includes/page.inc.php');
     break;

after:

  case 'disabled':
     include('includes/disabled.inc.php');
     break; 

You will have to create page.inc.php (and call it however you want). Next, you need to edit a link to your page in main.tpl in /themes/[your_theme], something like this:

<a href="index.php?mode=yourpage" title="yourpage">Link to my custom page!</a></li>

To make this complete I created a subtemplate page.inc.tpl for presentation which is called via smarty from page.inc.php

Hope this is not too much over your head. :)

custom pages

by icencrime, Friday, November 26, 2010, 19:30 (4903 days ago) @ Riba
edited by icencrime, Friday, November 26, 2010, 19:38

thanks a lot Riba. it works very well.

but..

i have some php codes.

how can i put them in page.inc.php

like

<?
$q2=mysql_query("select DATABASE from NEWS where id=1");
while ($r2=mysql_fetch_array($q2))
 
 
echo "<img src='$r2[data]'>";
 
?>

i can't work it.

please help me,
thank you! ;-)

custom pages

by Riba ⌂, Monday, November 29, 2010, 11:08 (4900 days ago) @ icencrime

Well the code seems to be on the right track, but without more info it is difficult to help. What and how does it fail? What have you tried to troubleshoot it? The tables used are just an example I suppose?

RSS Feed of thread