|
Page 2 of 2
|
Mighty Gorgon
Luca Libralato
Joined: August 2006
Posts: 7192
Location: Borgo San Michele
|
Re: CUSTOMIZATION - Create A Custom Page In Icy Phoenix 2.0
Sorry, but I have just tried on my setup and it is working as expected.
Are you sure you have added the page to "Standard Pages" in CMS?
You need to add the page with the correct filename and then add the blocks from CMS.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#16 Sun 25 Aug, 2013 19:30 |
|
Sponsors
|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
Silverman
Joined: August 2013
Posts: 9
Location:
|
Re: CUSTOMIZATION - Create A Custom Page In Icy Phoenix 2.0
Okay I am going through the steps here as I did them and see if I missed anything.
1. created guildrules.php and pasted inside the first code snippet from method 2. modified the name of the .tpl
2. created guildrules.tpl and pasted inside the code snippet from method 2.
3. saved both
4. uploaded via ftp as follows
(root)/guildrules.php
(root)/templates/default/guildrules.tpl
5. checked the page and it generated without error
6. went into cms added the page with this info and submitted.
Name: Guild Rules
Page ID: guildrules
Breadcrumbs: yes
View Permission: ALL
7. then added on block left (Nav Links) on right block did (User Block and Recent)
8. go to page to see if anything changed.
Blocks do not appear.
Checked logs internally and no error.
Checked logs for the server and no error.
Checked permissions of both files versus other files in their respective directories and they match.
Everything else works just fine.
|
#17 Mon 26 Aug, 2013 00:17 |
|
Limun
Joined: January 2008
Posts: 1334
Location: [Censor]
|
Re: CUSTOMIZATION - Create A Custom Page In Icy Phoenix 2.0
i think i found the reason why doesnt work I think
after few hours of searching my page finaly showed up
where is the problem ... now this is the best part
MG did a little mistake in his first post for option 2
this is correct
<?php /** * * @package Icy Phoenix * @version $Id$ * @copyright (c) 2008 Icy Phoenix * @license http://opensource.org/licenses/GPL-license.php GNU Public License * */
define('IN_ICYPHOENIX', true); if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './'); if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1)); include(IP_ROOT_PATH . 'common.' . PHP_EXT);
// Start session management $user->session_begin(); $auth->acl($user->data); $user->setup(); // End session management
$mycontent = '<b>My Fantastic Page</b>';
$template->assign_vars(array( 'MYCONTENT' => $mycontent ) );
full_page_generation('mycontent_body.tpl', $lang['MYCONTENT'], '', '');
?>
do you see the difference ?
a little space on first line <?php
can you confirm this Silverman ?
____________ We are the phpBBorg. Lower your Crackers. Your phpological and forumological distinctivness will be added to our own. Resistance if futile!
|
#18 Mon 26 Aug, 2013 08:53 |
|
Silverman
Joined: August 2013
Posts: 9
Location:
|
Re: CUSTOMIZATION - Create A Custom Page In Icy Phoenix 2.0
Checked the file, and even re-copied the file and uploaded, no change. I am going to reupload IP and see if that fixes it.
[UPDATE 1]IP is uploaded again, and no change.
Something else that is funny and this may help find the overall issue.
My navigation will not show a link to the file either.
[UPDATE 2]Correction, the default site map doesn't add the link but a custom menu block will.
Edited by Silverman, Tue 27 Aug, 2013 19:47: Update |
#19 Tue 27 Aug, 2013 18:55 |
|
Limun
Joined: January 2008
Posts: 1334
Location: [Censor]
|
Re: CUSTOMIZATION - Create A Custom Page In Icy Phoenix 2.0
can you be more specific please , i dont understand
does the site show up when you click preview ?
can you post here your guildrules.tpl and guildrules.php here
____________ We are the phpBBorg. Lower your Crackers. Your phpological and forumological distinctivness will be added to our own. Resistance if futile!
|
#20 Wed 28 Aug, 2013 07:59 |
|
Silverman
Joined: August 2013
Posts: 9
Location:
|
Re: CUSTOMIZATION - Create A Custom Page In Icy Phoenix 2.0
Yes the page shows up but without the blocks as I assigned in the Standard Pages.
guildrules.php exact copy
- <?php
- /**
- *
- * @package Icy Phoenix
- * @version $Id$
- * @copyright (c) 2008 Icy Phoenix
- * @license http://opensource.org/licenses/GPL-license.php GNU Public License
- *
- */
-
- define('IN_ICYPHOENIX', true);
- if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './');
- if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
- include(IP_ROOT_PATH . 'common.' . PHP_EXT);
-
- // Start session management
- $user->session_begin();
- $auth->acl($user->data);
- $user->setup();
- // End session management
-
- $mycontent = '<b>My Fantastic Page</b>';
-
- $template->assign_vars(array(
- 'MYCONTENT' => $mycontent
- )
- );
-
- full_page_generation('guildrules.tpl', $lang['MYCONTENT'], '', '');
-
- ?>
guildrules.tpl exact copy
- <!-- INCLUDE overall_header.tpl -->
- {MYCONTENT}
- <!-- INCLUDE overall_footer.tpl -->
Edit Site Page
Name: Guild Rules
PageID: guildrules
filename: guildrules.php
Page Navigation Block (Breadcrumbs): Off (have tried both)
View Permissions: ALL
|
#21 Wed 28 Aug, 2013 09:52 |
|
Mighty Gorgon
Luca Libralato
Joined: August 2006
Posts: 7192
Location: Borgo San Michele
|
Re: CUSTOMIZATION - Create A Custom Page In Icy Phoenix 2.0
Ok, I found the error.
I missed in the first version to add the PAGE_ID which is needed to display blocks and allows to use the AUTH system.
If you check again the first post, now the guide should work.
For your records, you need to add this to page top after inclusion of COMMON.PHP:
$cms_page['page_id'] = 'guildrules';
After this small edit everything should work without further edits.
Here is the altered code of the file you posted:
<?php
/**
*
* @package Icy Phoenix
* @version $Id$
* @copyright (c) 2008 Icy Phoenix
* @license http://opensource.org/licenses/GPL-license.php GNU Public License
*
*/
define('IN_ICYPHOENIX', true);
if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './');
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(IP_ROOT_PATH . 'common.' . PHP_EXT);
$cms_page['page_id'] = 'guildrules';
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// End session management
$mycontent = '<b>My Fantastic Page</b>';
$template->assign_vars(array(
'MYCONTENT' => $mycontent
)
);
full_page_generation('guildrules.tpl', $lang['MYCONTENT'], '', '');
?>
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#22 Wed 28 Aug, 2013 11:07 |
|
Silverman
Joined: August 2013
Posts: 9
Location:
|
Re: CUSTOMIZATION - Create A Custom Page In Icy Phoenix 2.0
That did it thank you everyone blocks are showing and changing just fine.
|
#23 Wed 28 Aug, 2013 11:52 |
|
Mighty Gorgon
Luca Libralato
Joined: August 2006
Posts: 7192
Location: Borgo San Michele
|
Re: CUSTOMIZATION - Create A Custom Page In Icy Phoenix 2.0
Great!
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#24 Thu 29 Aug, 2013 11:56 |
|
AndyGpy
Joined: October 2008
Posts: 191
Location:
|
Re: CUSTOMIZATION - Create A Custom Page In Icy Phoenix 2.0
HI All
I recently started playing with IP2.0, i have made a standard page but i would like to know how i address a database outwith IP ( on same server but a seperate database ). Also since upgrading to PHP5.5 and appache 2.4.6, the following line is no longer effective.
include(IP_ROOT_PATH . 'alerts/alertsconfig.'.PHP_EXT);
was fine on PHP5.3 and appache 2.2
Appreciate any guidance as these two problems are giving me a major headache
|
#25 Mon 20 Jan, 2014 01:30 |
|
mort
Spam Basher
Joined: August 2010
Posts: 998
Location: Up a tree
|
Re: CUSTOMIZATION - Create A Custom Page In Icy Phoenix 2.0
To call another database you would need another config file (myconfig.php) with the connect strings, and then you would need to include other strings(script) that calls and parses the connection data - and how it is to be handled - to what you are writing/doing that you want to keep separate.
Maybe something like this.
myconfig.php
$dbhost = 'localhost'; // Database host - usually localhost
$dbuser = ''; // Database User Name
$dbpass = ''; // Database Password
$dbname = ''; // Database Name
$dbpre = 0;
Your Page:
include "myconfig.php";
error_reporting(E_ALL);
$server = $dbhost;
$dbuser = $dbuser;
$dbpass = $dbpass;
$dbname = $dbname;
$x = mysql_connect($server,$dbuser,$dbpass) or die(mysql_error());
mysql_select_db($dbname,$x);
No doubt you will also have to address or re-define some CONSTANTS and variables - and then the whole thing will get messier.
There may be an easier way - - - - - - Dunno!
|
#26 Tue 21 Jan, 2014 05:29 |
|
Mighty Gorgon
Luca Libralato
Joined: August 2006
Posts: 7192
Location: Borgo San Michele
|
Re: CUSTOMIZATION - Create A Custom Page In Icy Phoenix 2.0
I recently started playing with IP2.0, i have made a standard page but i would like to know how i address a database outwith IP ( on same server but a seperate database ).
What do you mean by "address a database"? Do you need to run SQL on another DB?
Also since upgrading to PHP5.5 and appache 2.4.6, the following line is no longer effective.
include(IP_ROOT_PATH . 'alerts/alertsconfig.'.PHP_EXT);
was fine on PHP5.3 and appache 2.2
Appreciate any guidance as these two problems are giving me a major headache
What do you mean by "no longer effective"... that is just an inclusion... and it should work even on PHP 5.5!
Please open 2 specific topics in the General Support section... as they are not linked any more to this topic.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#27 Tue 21 Jan, 2014 16:00 |
|
yogeshpaji
yogesh paji
Joined: June 2023
Posts: 1
Location:
|
Re: CUSTOMIZATION - Create A Custom Page In Icy Phoenix 2.0
Good
|
#28 Tue 27 Jun, 2023 08:05 |
|
|
Page 2 of 2
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
Similar Topics
Similar Topics
You cannot post new topics You cannot reply to topics You cannot edit your posts You cannot delete your posts You cannot vote in polls You cannot attach files You can download files You cannot post calendar events
|
|
|
|