Notice

This old forum is now only available for consultation/read. User accounts on this old website are blocked.
Please create a new account on seblod.com and use the new forum http://www.seblod.com/community/forums.
Apologies for this perturbation and thank you for your understanding!
Welcome, Guest
Username Password: Remember me

GroupX in admin - how to make it repeatble?
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: GroupX in admin - how to make it repeatble?

GroupX in admin - how to make it repeatble? 3 years, 9 months ago #1

  • gendril
  • ( User )
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
Hi All

I have made this:

<p><?php echo $jSeblod->default_action->form; ?></p>
<p><?php echo $jSeblod->title->form; ?></p>
<?php for ( $i = 0, $n = sizeof( @$jSeblod->imgrepeat ) - 1; $i < $n; $i++ ) {
echo @$jSeblod->imgrepeat[$i][ 'selectimg1']->form;
echo @$jSeblod->imgrepeat[$i][ 'selectimg2']->form;
echo @$jSeblod->imgrepeat[$i][ 'selectimg3']->form;
echo @$jSeblod->imgrepeat[$i][ 'selectimg4']->form;
echo @$jSeblod->imgrepeat[$i][ 'tekst1']->form;
echo @$jSeblod->imgrepeat[$i][ 'tekst2']->form;
echo @$jSeblod->imgrepeat[$i][ 'tekst3']->form;
echo @$jSeblod->imgrepeat[$i][ 'tekst4']->form;
}?>

In the admin area i cant get it to display the ADD DELETE and MOVE icons to make it repeateble, so i guess i am missing some code that the default template adds for me. Can you please give me a kode example?

Re: GroupX in admin - how to make it repeatble? 3 years, 9 months ago #2

  • SEBLOD - Bes
  • ( Admin )
  • OFFLINE
  • Administrator
  • Working on SEBLOD 2.5 GA
  • Posts: 3387
Hi Gendril,

thanks for your post.

Difficult task... You must have a look on auto default template code or use this default template and change it for your needs (do a copy before and works on this copy).

Best Regards
5 Things to Start with SEBLOD 1. Documentation 2. Videos 3. Getting Started & FAQ 4. Tips & Tricks 5. SEBLOD Forum
If you use SEBLOD CCK, please post a rating and a review at the Joomla! Extensions Directory. Thanks to you.!!"
Joomla! Extension Directory Team Member (JED)
Joomla! Showcase Team Member

Re: GroupX in admin - how to make it repeatble? 3 years, 9 months ago #3

  • gendril
  • ( User )
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
OK np mate ill need a php programmer then

Re: GroupX in admin - how to make it repeatble? 3 years, 9 months ago #4

  • rpoy
  • ( User )
  • OFFLINE
  • Gold Boarder
  • Learning to CSS in PHP
  • Posts: 254
Hi!

Ok I'll take a shot at this...

First, I like the way that Seblod presents the admin form. But when you create a custom template you have a lot of work to recreate the template. So what I have done is create a template function file that contains all of the logic based on the Seblod layout.

So the template_function file contains several functions to help in rebuilding the template.

To add it to your custom template you need copy the file into the template directory and to add this to your index.php or index2.php file:
 
<?php
$adminfunctionfile = dirname(__FILE__) . '/template_functions.php';
include( $adminfunctionfile );
?>
 

That links the function file to the index file so that you can call the functions.

So when you create your custom template, you will have a list of all of the fields in your content type like so:
 
<p>$jSeblod->field_name->form</p>;
 


To create a row in a table you just need to do this:
 
<table class="admintable" width="100%">
<?php admin_row_layout($jSeblod->field_name, $path, $tooltipIcon, '');?>
</table>
 

The '' I use for formatting calculated values that I have going on in my content type. So I can put '$' and it will format a money value. But if you use this, be careful because it changes field to a value instead of a form. That means you can not enter data into your content type.

To create a groupX in your table you do this:
 
<table class="admintable" width="100%">
<?php insert_groupx_list($jSeblod->groupX_name, "TRUE", $path, $tooltipIcon, $root); ?>
</table>
 

The "TRUE" value will place a header. If you put "FALSE" there will not be a header.

Its still a work in progress - there were a bunch of other things that I am trying to do with it like create table footers and things like that - which kinda works. This whole thing might be a complete waste when Seblod 2.0 comes out so Im a bit apprehensive to continue to work on it. It does what I want for now - create rows and groupX layouts in the admin form.

Hope that helps.
Attachments:
Joomla Version: 2.5
CCK Version: 2.2
The following user(s) said Thank You: SEBLOD - Bes

Re: GroupX in admin - how to make it repeatble? 2 years, 9 months ago #5

Hi,
I can not download template_functions.php .
please help me.

thanks
  • Page:
  • 1
Time to create page: 0.35 seconds