FORUMS CLOSED DUE TO SPAM. YOU STILL CAN ADD POST!

Custom data plugin

Feed 5 posts, 3 voices

Avatar
9 posts

Hello everyone!

Custom data plugin allows you to keep custom data (like company name, phone number or email address) in the separated tab on Frog CMS.

Take a look to sql_update.txt file. You can easily add your own custom fields to database.

Getting value from specific field:

<?php custom_data('field_sys_name'); ?>

Download plugin

 
Avatar
180 posts

Hi!

I try to use your plugin. It very simply.

Some notes.

1. You can install your MySQL table by file “enable.php”. You can look at “comments” plugin for more information.
2. You can look at plugins API (file app/models/Plugin.php). This class have methods Plugin::getSettings() and Plugin::setSettings(). This methods do same operations as your plugin. Maybe you can write some backend page for managing data of DB table “*_settings”.

In any case, your plugin is very useful! Thanks!

 
Avatar
9 posts

Thanks for your request jMas!

Maybe I’ll make these refinements in the future.

If you have more free time you can do this and upload new plugin version!

Thanks again!

 
Avatar
180 posts

Ok, only if I have free time… -) But idea is great. I think we should continue it.

 
Avatar
26 posts

I find it usefull, currently use it on a Wolf CMS driven website.
Though I advise you to return the output, instead of echoing it.
That way one can do the following:

<?php echo (custom_data('name') > 0) ? '' : '<h3>'.custom_data('name').'</h3>'; ?>
 
Avatar
180 posts

More right way:

<?php echo (($data = custom_data('name')) > 0 ? '' : '<h3>'. $data .'</h3>'); ?>