Skip to Content Skip to Menu

cb articles image

10 years 3 months ago - 10 years 3 months ago #246723 by thewebsurfer
cb articles image was created by thewebsurfer
hi, i would to improve the cb articles look.
there is a way to show the intro image or the first inner text image?
Last edit: 10 years 3 months ago by thewebsurfer.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8282
  • Karma: 1443
10 years 3 months ago #246746 by krileon
Replied by krileon on topic cb articles image
CB Articles uses its own template system for frontend display. This makes it easier to edit and add whatever you like to it. There's no built in display of text images or intro text for an article, but you could add it by editing the CB Articles template files at the below location.

components/com_comprofiler/plugin/user/plug_cbarticles/templates/default/tab.php


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 or Create an account to join the conversation.

10 years 3 months ago #246747 by thewebsurfer
Replied by thewebsurfer on topic cb articles image

krileon wrote: CB Articles uses its own template system for frontend display. This makes it easier to edit and add whatever you like to it. There's no built in display of text images or intro text for an article, but you could add it by editing the CB Articles template files at the below location.

components/com_comprofiler/plugin/user/plug_cbarticles/templates/default/tab.php


so i can add my own template, right? how? :)

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

10 years 3 months ago - 10 years 3 months ago #246757 by thewebsurfer
Replied by thewebsurfer on topic cb articles image
this code gets the intro image (in row #28 foreach)
Code:
$image=json_decode($row->images,true); $image=$image['image_intro'];
$image contains the relative url of the image


now, how can i show some html code in tab.php ONLY if i'm on my profile (in tab.php)?
my purpose is add a "send article" link in cb articles.
Last edit: 10 years 3 months ago by thewebsurfer.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8282
  • Karma: 1443
10 years 3 months ago #246828 by krileon
Replied by krileon on topic cb articles image

so i can add my own template, right?

Yes.

how?

Copy the default template folder, rename it to whatever you like (alphanumeric only), then delete all the files in your new template folder that you don't want to change (template system has built in fallback, except for images loaded by CSS). Now edit the remaining files that you want to change. Next in CB Articles > Config select your template.

now, how can i show some html code in tab.php ONLY if i'm on my profile (in tab.php)?

The Joomla content object isn't returned by CB Articles as it never had a need for it. You'll need to query for or use Joomla API to grab the Joomla content object using the content ID (e.g. $row->id).


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 or Create an account to join the conversation.

10 years 3 months ago #246834 by thewebsurfer
Replied by thewebsurfer on topic cb articles image

krileon wrote: The Joomla content object isn't returned by CB Articles as it never had a need for it. You'll need to query for or use Joomla API to grab the Joomla content object using the content ID (e.g. $row->id).

i'm not clear with that, could you help me?

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

Moderators: beatnantkrileon
Powered by Kunena Forum