Advanced Users Code Generator
12 posts by 7 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: July 16, 2010 (RSS)
By Kenny - April 17, 2010
What you would wind up with is something like this:
<?php require_once "/home/website/public_html/cmsAdmin/lib/viewer_functions.php";
list($home_pageRecords, $home_pageMetaData) = getRecords(array(
'tableName' => 'home_page',
));
?>
<?php foreach ($home_pageRecords as $record): ?>
Record Number: <?php echo $record['num'] ?>
Title: <?php echo $record['title'] ?>
Content: <?php echo $record['content'] ?>
_link : <a href="<?php echo $record['_link'] ?>"><?php echo $record['_link'] ?></a>
<?php endforeach ?>
Kenny
Re: [sagentic] Advanced Users Code Generator
By Dave - April 17, 2010
Sure, what would you like that option to be called? And should it be a hard coded options or one that you can set each time? (Meaning would you ever want the extra code back again?).
Let me know, thanks!
interactivetools.com
Re: [Dave] Advanced Users Code Generator
By Kenny - April 17, 2010
I don't know if it would be easier on you to make a plugin that could be activated and deactivated or placing a check in the box under general settings. I pretty sure it would not need to be "per section" as if you are advanced enough to do it for one you should be able to o it for all.
Thanks Dave!
Kenny
Re: [sagentic] Advanced Users Code Generator
By Toledoh - April 17, 2010
Tim (toledoh.com.au)
Re: [Toledoh] Advanced Users Code Generator
By flamerz - April 18, 2010
some minimal start/end comments tag should be nice too.
Re: [sagentic] Advanced Users Code Generator
By Dave - April 19, 2010
If you're already running a beta it might not get added automatically in which case you can add the setting manually to your settings.dat.php like this:
[advanced]
imageResizeQuality = 80
showExpandedMenu = 0
disableFlashUploader = 0
codeGeneratorExpertMode = 1
hideLanguageSettings = 0
Otherwise, just check this option under: Admin > General
Code Generator [_] Expert mode - don't show instructions or extra html in Code Generator output
Hope that helps!
interactivetools.com
Re: [Dave] Advanced Users Code Generator
By sublmnl - April 28, 2010
Two more suggestions, remove the comment markup around the images and also remove any text before the <php> tags.
So it is just code - you should be able to see the field names and be good.
Re: [sublmnl] Advanced Users Code Generator
By Dave - April 28, 2010
Can you give an example of: "also remove any text before the <php> tags. "
Thanks!
interactivetools.com
Re: [Dave] Advanced Users Code Generator
By sublmnl - April 28, 2010 - edited: April 28, 2010
Record Number: <?php echo $record['num'] ?>
Title: <?php echo $record['title'] ?>
Content: <?php echo $record['content'] ?>
_link : <a href="<?php echo $record['_link'] ?>"><?php echo $record['_link'] ?></a>
I will give credit where its due however - the comment for the PHP time thing is helpful. So yeah having the ability to perhaps have a checkbox to turn on/off the coding options is nice.... sometimes I forget stuff too.