Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
new php page
jamesd116



Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa

Posted: 04/08/09 20:11 
Bryan can you see anything wrong here why my inlude will not work inhere


Code
<?php
/**
 * Jamroom RingTone Module Form Controller
 * @copyright 2009 by 4spotlight
 * @author James Dallas - support@4spotlight.com
 */
require('include/jamroom-include.inc.php');

// Our script
$GLOBALS['JR_SCRIPT_NAME'] = 'rtCreator.php';

$_post = getPostVars();
// Login required - get $_user
$_user = sessionVerify();
// get the correct language pack included..
$language = getLanguage($_user['user_language']);

jmHtmlBegin($language['rtCreator'][1]);
        jmBodyBegin();
        jmSpanCell($language['rtCreator'][1],'',30,'html_modify.png');

// start content
ob_start();
include('rtones.php');
$_tmp = ob_end_clean();

jrHtmlFormRawText($_tmp);
 
        jmBodyEnd();
        jmHtmlEnd();

?>




_________________
One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 04/09/09 09:06 
This won't work - ob_end_clean turns off the output buffer and discards the contents. you need to do:


Code

ob_start();
include("{$jamroom['jm_dir']}/rtones.php");
$_tmp = ob_get_contents();
ob_end_clean();


http://us.php.net/ob_end_clean
http://us.php.net/ob_get_contents

Also - for performance/security reasons you should always fully path include()'s

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
jamesd116



Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa

Posted: 04/09/09 10:02 
Great thanks this will get things moving along thank you Brian and Kyle I am on my way to Pittsburgh 5 hrs away if someone can take a look and see why its now doing what its doing ( I had this problem before also when the page wasdisplaying improperly
http://www.4spotlight.com/otherimages/rtcreator.bmp

with the codeas follows

Code
jmHtmlBegin($language['rtCreator'][1]);
        jmBodyBegin();
        jmSpanCell($language['rtCreator'][1],'',30,'html_modify.png');

ob_start();
include("{$jamroom['jm_dir']}/rtones.php");
$_tmp = ob_get_contents();
ob_end_clean();


jrHtmlFormRawText($_tmp);
 
        jmBodyEnd();
        jmHtmlEnd();

?>


Thank you i will get working on this when my trip is finished. if anyone ever vists the Burgh try one of Pittsburghs Steak Salads they are the best food.


_________________
One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 04/09/09 18:00 
Dah crap - my bad, I don't know why I was thinking ob_end_clean.

The problem in the picture looks like a problem with your templates, not the script.


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
jamesd116



Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa

Posted: 04/09/09 20:56 
doeos any one know why the page is showing distorted


_________________
One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 04/09/09 23:33 

smith.kyle:
The problem in the picture looks like a problem with your templates, not the script.



_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
jamesd116



Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa

Posted: 04/10/09 04:46 
Im not saying its the script but some reason when the page is showing it throws the page off so I figured there was something that I could maybe place before the page or before/after the include that would allow the page to render the way that it should.


_________________
One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Back to top
jamesd116



Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa

Posted: 04/10/09 05:26 
i almost have this fixed from the other page


_________________
One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Developers

< Previous12
 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.