HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Understanding import_id_remap_get

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#90819 (In Topic #18330)
Avatar

Community saint

Hi Chris,

Am I correct in assuming this function returns me the NEW (ocPortal) ID of a recently imported id?

The reason I ask is I am trying to improve the SMF1 importer because I notice it doesn't respect the AUTO Promote  based on points of groups as they are imported so i was going to add a function that after the groups are imported I will sort the old groups based on points required thresholds and update the new groups in ocPortal to reflect the promotion system.

I am hoping to have SMF1 importer working really well before I convert to SMF 2.
Back to the top
 
Posted
Rating:
#90821
Avatar

Community saint

Also I am thinking about stripping out the update of Compressed output from the import config section so other users don't experience the problem I had. Do you agree with that decision or should I leave it in?
Back to the top
 
Posted
Rating:
#90822
Avatar

yes and yes

btw feel free to clarify API docs on functions that confuse you (the PHP doc headings)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#90823
Avatar

Community saint

one more sorry:

I am looking at the ocp9 table for f_groups and this field g_is_default  for all my groups says 0 despite the fact that when I look at groups through admin Newbie is set to initial primary group. I would have assumed there would be a 1 there in the DB? Since it isn't what is this field for and how and where is the initial primary group set?
Back to the top
 
Posted
Rating:
#90824
Avatar

Community saint

Also I will clarify it on the phpdoc headings as it says this

 * Get the remapping for the id in the specified type. Whether it returns NULL or gives an error message depends on $fail_ok.
 *
 * @param  ID_TEXT      An importation type code, from those ocPortal has defined
 * @param  string         The source (old, original) ID of the mapping
 * @param  boolean      If it is okay to fail to find a mapping
 * @return ?AUTO_LINK   The remapping (NULL: not found)

Which to me is just a little muddier than Returns the NEW ID of an imported old ID (I have a much simpler brain than some)
Back to the top
 
Posted
Rating:
#90825
Avatar

Duck said

Also I will clarify it on the phpdoc headings as it says this

 * Get the remapping for the id in the specified type. Whether it returns NULL or gives an error message depends on $fail_ok.
 *
 * @param  ID_TEXT      An importation type code, from those ocPortal has defined
 * @param  string         The source (old, original) ID of the mapping
 * @param  boolean      If it is okay to fail to find a mapping
 * @return ?AUTO_LINK   The remapping (NULL: not found)

Which to me is just a little muddier than Returns the NEW ID of an imported old ID (I have a much simpler brain than some)

Yeah message isn't clear. Particularly also "Whether it returns NULL or gives an error message depends on $fail_ok." should be qualified, e.g. "Upon error, whether it returns NULL or gives an error message depends on $fail_ok."


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#90826
Avatar

Duck said

one more sorry:

I am looking at the ocp9 table for f_groups and this field g_is_default  for all my groups says 0 despite the fact that when I look at groups through admin Newbie is set to initial primary group. I would have assumed there would be a 1 there in the DB? Since it isn't what is this field for and how and where is the initial primary group set?

IIRC if one gets a default, it causes a change in behaviour. If no default set, it is hard coded to Newbie. If multiple defaults, it provides a choice.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#90827
Avatar

Community saint

ok cool. My initial thought was to take whatever SMF group was set to zero points (and is based on points) and set it to default in ocportal but after experimenting I realize it can accept multiple groups at zero as well and this could probably lead to confusion or problems I imagine and at the very least add unnecessary complexity so I will skip that part. But thanks for clarification. I believe I should be good from here out! lol (fingers crossed)
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: