1283 Posts
Bucklash
6 years ago
5
Topic

Hi folks 

Well, mainly, Klas :)

Thanks for your continuing help in all things Seblod, by the way!

Here we go:

Is there a method to do this like:

$object = JCckContentFree;

$newData = new $object;



$addData = $newData->create(
        'my_free_form,
        array('title' => 'My Free Title, 'data' => 'some more data')
      );

In plugins/storage_location I have all the storage possibilities:

plugins/storage_location/free
plugins/storage_location/joomla_article
plugins/storage_location/joomla_category
plugins/storage_location/joomla_menu_item
plugins/storage_location/joomla_tag
plugins/storage_location/joomla_user
plugins/storage_location/joomla_user_group
plugins/storage_location/joomla_user_note<br>

Just, can't work out how to do Free though.....

Thanks

Jon

Get a VIP membership
4229 Posts
Kadministrator
6 years ago
2
Level 1

Currently there is no JCckContentFree so I would guess this is not yet implemented for free storage

1283 Posts
Bucklash
6 years ago
1
Level 2

Ok, thanks

I will add to github as feature request 

Would be good me thinks 

4229 Posts
Kadministrator
6 years ago
0
Level 3

Yes, agree.

6 years ago
1
Level 1

Hi,

perhaps this could help : 

//RECORD INSERTION IN FREE TABLE WITH "CODE AFTER STORE "

// Get a db connection.

$db = JFactory::getDbo(); 

// Create a new query object. 

$query = $db->getQuery(true); 

// Insert columns from my "free table" 

$columns = array('team_id', 'player_id', 'season_id'); 

// Inserting values from my Form Values 

$values = array($db->quote($fields['tra_equipe_bl']->value), $db->quote($fields['tra_id_val']->value), $db->quote($fields['tra_saison_bl']->value)); 

// Prepare the insert query in your custom table

$query 

->insert($db->quoteName('#__bl_players_team')) 

->columns($db->quoteName($columns)) 

->values(implode(',', $values)); 

// Set the query using our newly populated query object and execute it. 

$db->setQuery($query); $db->execute();

This is working for me.

1283 Posts
Bucklash
6 years ago
0
Level 2

Hi nelsonalgarve

Thanks for posting a solution...

Yes, I ended up using Joomla goodness to do it...

For my free table which is #__viewlevels, I added data to  pseudo-cck tables and core ie

#__viewlevels  (stored here, then got id/pk)

#__cck_core 

#__cck_store_form_access

#__cck_store_item_viewlevels

This works nicely ..... so far :D

 

Get a Book for SEBLOD