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.
Not a member yet? Click here to register.
Forgot Password?

Custom Pages Questions

Asked Modified Viewed 6,741 times
L
Le Marcus
L
  • Newbie, joined since
  • Contributed 7 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
asked
Newbie

Hi Good day! I found PHPFusion on another site I was surfing and I visited this site that uses PHP Fusion and I like the whole system its complete with the forums and everything. I just wanna ask about something regarding the creation of Custom Pages...

I created a Custom Page.. and when I click SAVE It shows the link to view the page..

viewpage.php?page_id=2 Like this one... My Question will it Be possible to Create a Custom page and Name it as a MyPage.php only without the ?page_id=2 Will that be possible or any mods needed thanks... Hope to help me guys... More Power to PHP Fusion
0 replies

19 posts

A
afaaro
A
afaaro 10
  • Senior Member, joined since
  • Contributed 295 posts on the community forums.
  • Started 68 threads in the forums
answered
Senior Member

Visit this site, it well help http://www.web-bureau.com/url-optimisation-r39.htm
0 replies
L
Le Marcus
L
  • Newbie, joined since
  • Contributed 7 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
answered
Newbie

what will i do on that seoname.php? I copied the whole code on it... and saved it as seoname.php but it returns a error.. thanks
0 replies
M
Matonor
M
Impossible things are there to be made possible
  • Veteran Member, joined since
  • Contributed 1,022 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

Use this as a Base:
<?php
/*---------------------------------------------------+
| PHPFusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";

opentable("Title");
//Code
closetable();

require_once "side_right.php";
require_once "footer.php";
?>


Copy&Paste it into a new file, put your Custom Page Code where it says //Code and save it as MyPage.php
0 replies
R
Raskolnikov
R
promote.opera.com/small/opera94x15.gif
  • Member, joined since
  • Contributed 71 posts on the community forums.
  • Started 8 threads in the forums
answered
Member

Quote

Matonor wrote:
Use this as a Base:
<?php
/*---------------------------------------------------+
| PHPFusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";

opentable("Title");
//Code
closetable();

require_once "side_right.php";
require_once "footer.php";
?>


Copy&Paste it into a new file, put your Custom Page Code where it says //Code and save it as MyPage.php


Hey, that's a pretty neat trick! :)
0 replies
L
Le Marcus
L
  • Newbie, joined since
  • Contributed 7 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
answered
Newbie

Thanks a lot Matanor.. Very nice.. but theres an error regarding the Footer here it is..

Quote

Warning: mysql_close(): no MySQL-Link resource supplied in /home/fizzo/domains/ayc.frih.net/public_html/WBA/footer.php on line 25


And this one.

Quote

Access denied for user: 'apache@localhost' (Using password: NO)


Thanks a lot..:)
0 replies
K
kneekoo
K
  • Senior Member, joined since
  • Contributed 289 posts on the community forums.
  • Started 12 threads in the forums
  • Answered 1 question
answered
Senior Member

Note this:

Quote

require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";

It means your file should be in the same folder with maincore.php and the other ones. If you want to use that custom page in another folder, let's say:

Quote

www.mysite.com/myfolder/custompage.php

then you will have to add "../" in front of the files' names to be included, like this:

Quote

require_once "../maincore.php";
require_once "../subheader.php";
require_once "../side_left.php";


I noticed that you use that WBA folder. As for your second error... Does your config.php hold the correct information for the database connection?
0 replies
L
Le Marcus
L
  • Newbie, joined since
  • Contributed 7 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
answered
Newbie

I placed the Cutompage file where the Maincore.php and subheader side_left and footer are placed... But it still gives me the same error...

On the Second error..
The database connections I used on the Custompage is different from the information from the config.php

Will it be possible to put 3 or more database connection information thru the config.php?? if it is How? Thanks guys its been a huge help for me as a beginner...
0 replies
M
Matonor
M
Impossible things are there to be made possible
  • Veteran Member, joined since
  • Contributed 1,022 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

If you open a new database connection, you have to reopen or reselect the php-fusion database connection afterwards.
that's why you get the error.
you can put additional vars in config.php, but taht does not change the above fact.
0 replies
L
Le Marcus
L
  • Newbie, joined since
  • Contributed 7 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
answered
Newbie

oh i see but how can i do that creating additional vars?
0 replies
S
SiLTuX
S
SiLTuX 10
  • Newbie, joined since
  • Contributed 8 posts on the community forums.
  • Started 1 thread in the forums
answered
Newbie

wow ... that's very nice Matonor ... i've tested and gor really really impresed ... phpfusion went from rank 7 to 9 for me ... starting today it's my fav CMS :D ( it was my second until today :) )
0 replies
— 2 months later —
K
kneekoo
K
  • Senior Member, joined since
  • Contributed 289 posts on the community forums.
  • Started 12 threads in the forums
  • Answered 1 question
answered
Senior Member

Quote

thewashman wrote:
...unable to add code where it says //Code When I do I get this error.

Quote

Parse error: syntax error, unexpected T_STRING in /home/www/*****.com/new-page.php on line 17

Make sure your code is PHP. If it's HTML use this:

Quote

?>

// HTML Code

<?php
0 replies
8
8thWonder
8
  • Newbie, joined since
  • Contributed 4 posts on the community forums.
  • Started 1 thread in the forums
answered
Newbie

Quote

Matonor wrote:
If you open a new database connection, you have to reopen or reselect the php-fusion database connection afterwards.
that's why you get the error.
you can put additional vars in config.php, but taht does not change the above fact.


Sir.. how can I do this one? Is there a step by step process to do this? Thanks appreciate your help..
0 replies
8
8thWonder
8
  • Newbie, joined since
  • Contributed 4 posts on the community forums.
  • Started 1 thread in the forums
answered
Newbie

Anyone please help..
0 replies
B
buyonaut
B
  • Junior Member, joined since
  • Contributed 33 posts on the community forums.
  • Started 8 threads in the forums
answered
Junior Member

Hi guys, this is a excellent feature here! Full 10 points! However I'm facing a small error - I have implemented this method on my custom pages that also contains the code to display articles and everything works good only whent the page is loaded I get this code/error on the top of the screen; 

It seems to me that it has something to do with maincore and header function; here is the code of that custom page;

<?php
/*---------------------------------------------------+
| PHPFusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";



opentable('Free tips for Bundesliga, Premiership, Champions League and other European football leagues!');


echo "<table width='100%'><tr><td><center><b>FASTEST GROWING EUROPEAN BOOKMAKER WITH THE BEST ODDS - ONLY QUALITY!</b><BR><BR>
<script language='javascript' src='http://affiliatesys.interwetten.com/ad.aspx?pid=786&bid=291' ></script></center></td></tr></table>
<br><br>\n";


$shading = true; // Enable row shading (true/false)

$num_articles = 80; // How many articles to display



if (file_exists(INFUSIONS."articles_list_panel/locale/".$settings['locale'].".php")) {

include INFUSIONS."articles_list_panel/locale/".$settings['locale'].".php";

} else {

include INFUSIONS."articles_list_panel/locale/English.php";

}




function display_articles($article,$category,$a_author) {

$display_article = "<tr>\n<td align='left' class='tbl2'><a href='".BASEDIR."readarticle.php?article_id=".$article['article_id']."'>".$article['article_subject']."</a></td>



<td align='left' class='tbl2'><a href='".BASEDIR."profile.php?lookup=".$article['article_name']."'>".$a_author."</td>

<td align='center' class='tbl2'>".$article['article_reads']."</td>

<td align='right' class='tbl2'>".$article['article_datestamp']."</td>\n</tr>\n

<tr><td colspan='5' class='tbl1'><span class='small'>".$article['article_snippet']."</span></td></tr>";

return $display_article;

}



opentable($locale['ALP_001']);



$most_recent_articles = dbquery("SELECT * FROM ".$db_prefix."articles ORDER BY article_id DESC");



echo "<table width='100%' cellpadding='0' cellspacing='0' style='text-indent:2px'>\n<tr>\n";



if (dbrows($most_recent_articles)) {



// Display headings

echo "

<td class='tbl1' align='left'><b>".$locale['ALP_002']."</b></td>



<td class='tbl1' align='left'><b>".$locale['ALP_004']."</b></td>

<td class='tbl1' align='center'><b>".$locale['ALP_005']."</b></td>

<td class='tbl1' align='right'><b>".$locale['ALP_006']."</b></td>

</tr>";



// Only display articles that exist

while($article = dbarray($most_recent_articles)) {



if ( $x <= $num_articles ) {

// Calculate date submitted

$article['article_datestamp'] = showdate("forumdate",$article['article_datestamp']);



// Look up Category

$result = dbquery("SELECT article_cat_name FROM ".$db_prefix."article_cats WHERE article_cat_id='".$article['article_cat']."'");

$category = dbresult($result,0);



// Look up Author

$result = dbquery("SELECT user_name FROM ".$db_prefix."users WHERE user_id='".$article['article_name']."'");

$a_author = dbresult($result,0);



// Display articles

echo display_articles($article,$cathegory,$a_author);

$x++;

}

}

} else {

echo "<tr><td colspan='5' align='center'><p>".$locale['ALP_007']."</p></td></tr>";

}



echo "</table>";



closetable();

tablebreak();






closetable();

require_once "side_right.php";
require_once "footer.php";
?>






0 replies
B
buyonaut
B
  • Junior Member, joined since
  • Contributed 33 posts on the community forums.
  • Started 8 threads in the forums
answered
Junior Member

Any ideas what that might be and how to remove that error? thanks a lot for your help!

You can check the page where it appears; url
Edited by buyonaut on 28-08-2007 12:03,
0 replies
B
buyonaut
B
  • Junior Member, joined since
  • Contributed 33 posts on the community forums.
  • Started 8 threads in the forums
answered
Junior Member

This is the error that is displayed;

Warning: Cannot modify header information - headers already sent by (output started at /home/bet2win/public_html/free-football-tips.php:1) in /home/bet2win/public_html/maincore.php on line 219

however line 219 is related to cookies ? Help please
0 replies
M
Matonor
M
Impossible things are there to be made possible
  • Veteran Member, joined since
  • Contributed 1,022 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

remove whitespaces before the <?php opening tag
0 replies
B
buyonaut
B
  • Junior Member, joined since
  • Contributed 33 posts on the community forums.
  • Started 8 threads in the forums
answered
Junior Member

OK, there was no white spaces but it didn't work for some reason - I have copied and pasted whole file again and add the page title (which was not there before) and now it works perfect! Seems like a small bug in the system. Thanks a lot Matonor!!
0 replies
F
fernbap
F
  • Junior Member, joined since
  • Contributed 13 posts on the community forums.
  • Started 3 threads in the forums
answered
Junior Member

This is awesome stuff! I needed to use $_POST and $GET methods between pages and would never thought of that!

I wanted to move a complete website into php-fusion, and that is just the right way to do it!

Thanks a lot, you made my day! :)

Btw, if you want to see the result, the link is http://stcbunch.net (not complete yet, working on it)
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 19 posts
  • Votes 0 votes
  • Topic users 9 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet