[SOLVED] Auto Article creation upon plan subscription

12 years 2 months ago - 12 years 2 months ago #194424 by raniko
Hello. Im using cb 1.8, j1.7.5 and cbsubs 1.3rc1...

I am curious to know if its possible to "auto generate" articles for members that subscribe to premium plans. So, if a user selects 1 of 4 premium plans (teacher premium, student premium...) then an article would be generated and placed into the corresponding teacher or student joomla category so that they will automatically appear on article modules on the home page. The articles would be comprised of 2 fields that are filled out on the registration/edit profile forms... one with their avatar, the other will be a text area field.

If this is not possible, is there a way to add a menu item (perhaps the submit article button) that is pre-templated to include these fields and the user would only have to click on the menu and hit "submit" to have the article created and placed into the correct category?

If neither of these options are currently doable, can you help me with the correct syntax to add two fields from a specific profile user to a joomla article so that I can create them from the backend? The fields would be avatar and cb_summary. I've tried this a couple of ways using the tutorial on your signature but all that appears in my articles are the code, not the fields themselves... I must be butchering it somehow....

Many thanks.

Please Log in to join the conversation.

12 years 2 months ago #194430 by krileon
Suppose you could do this by directly adding an entry to the _content database table using queries with CBSubs SQL Actions. Aside from that, nope. You can display fields in articles using substitutions with incubator project CB Content Bot as well. It's possible to have a new article button, but it won't be populated with any CB data; nor can it be without some sort of new Joomla plugin to do just that.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 2 months ago #194434 by raniko
Okay. I'll just do this manually until I can gauge how necessary it is to build queries.

So, I have the CBSubs Content installed as a CB plugin and the Cbpaidsubs bot installed as a joomla plugin (i think i need this too).

Still, I am not sure how to add specific user fields to an article. I assume I would have to include their specific user id in the there somehow. Can you give me one simple example of how to include a specific users avatar or field in an article written in the backend?

Thanks.

Please Log in to join the conversation.

12 years 2 months ago #194436 by krileon

Still, I am not sure how to add specific user fields to an article. I assume I would have to include their specific user id in the there somehow. Can you give me one simple example of how to include a specific users avatar or field in an article written in the backend?

You need incubator project CB Content Bot so substitutions can be rendered in Joomla articles. You then use normal substitution usages, but surround them with {cb:}. See tutorials within my signature for further substitution usage information.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 2 months ago #194477 by raniko
So I didn't realize that I had CB Content unpublished... oops. Now that I have that published, I tried using a number of examples from the tutorials and could only get one to work... I'm hoping there is an fix :). Here are my trials and report backs.



1) Simple raw field1
{cb:[avatar]}
This gets output as an unusable link in the rendered article... how can I make the avatar appear?

2) Simple raw field2

{cb:[cb_businesssummary]}
This works... The text area field is shown in full on the rendered article.

3) Raw Field Value

{cb:[userdata field="cb_businesssumary"/]}
this gets rendered as [userdata field="cb_businesssumary"/] in the article... Am I making a mistake?

4) Original Field Value

{cb:[userfield field="cb_businesssumary"/]}
this gets rendered as [userfield field="cb_businesssumary"/] in the article... Am I making a mistake?

5) Attempt at user specific field

{cb:[userdatafield field="cb_businesssummary" user="126"/]}
This gets rendered as [userdatafield field="cb_businesssummary" user="126"/] in the article...

This last one is most important because I would like to create articles that always reflect data from specific users. Any help you can provide on why everything breaks except for the simple raw field (non avatar) example I would greatly appreciate it. I am using cb1.8 & j1.7.5. Also, I'm using JCE editor.

Many thanks!

Please Log in to join the conversation.

12 years 2 months ago #194506 by krileon
"userdatafield" isn't a substitution. Please try the below.

{cb:[cb:userfield user="126" field="cb_businesssumary" /]}


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.234 seconds

Facebook Twitter LinkedIn