Keyword

How author is related with k2 items?

  • Fotis Chartsioudis
  • Fotis Chartsioudis's Avatar Topic Author
  • Offline
  • New Member
More
8 years 8 months ago #150717 by Fotis Chartsioudis
How author is related with k2 items? was created by Fotis Chartsioudis
Hello everyone,

I have written a php script which creates k2 items in my site's database without having to login to the administration panel of my joomla site.
When I view the new item, it is created as supposed but it does not show the author's name ("written by" phrase is empty).
Note that in my php script I set an integer value for the "created_by" column of the k2_items table, which is the userID of the k2_users table.
Also, at the end of the item there is not any info about the author and his latest articles.
If I use the administration panel to create new items all work fine.
Could you tell me what am I missing for my php script?
Could you explain me how author and k2 item are related??

Thank you

Please Log in or Create an account to join the conversation.

More
8 years 8 months ago #150742 by Lefteris
Replied by Lefteris on topic How author is related with k2 items?
Hi,

You have to pass the ID of the Joomla! user, not the K2 profile ID.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Fotis Chartsioudis
  • Fotis Chartsioudis's Avatar Topic Author
  • Offline
  • New Member
More
8 years 8 months ago - 8 years 8 months ago #150747 by Fotis Chartsioudis
Replied by Fotis Chartsioudis on topic How author is related with k2 items?
Hi,


yes I passed the correct ID.

Anyway I solved it. The problem was in my php script, in the insert statement. I wasn't inserting all the parameters in the correct way.

Thank you for your reply.

Please mark this topic as solved.
Last edit: 8 years 8 months ago by Fotis Chartsioudis.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum