| 
Welcome, Guest

CBAuthorBot Hack - Show CB Avatar in articles
(1 viewing) (1) Guest

TOPIC: CBAuthorBot Hack - Show CB Avatar in articles

Re:CBAuthorBot Hack - Show CB Avatar in articles 5 years, 6 months ago #17634

  • Posts:
  • Karma:
It's been a while since I've checked this thread, but I'm glad to see that others have taken the original idea and expanded on it. Great work everyone!

Re:CBAuthorBot Hack - Show CB Avatar in articles 5 years, 6 months ago #17801

  • Posts:
  • Karma:
ccdog wrote:
Bummer... somehow that hack doesn't work for me.. no images show up in articles... did somebody say before this didn't work in mamblog?


This probably won't work in Mamblog because Mamblog does not display Mambots. It should work with regular content items.


¿mamblog does support mambots?, but there is no way to use this hack and mamblog, or hack you code directly?



Martin
¡mas vale no saber!

Re:CBAuthorBot Hack - Show CB Avatar in articles 5 years, 5 months ago #20580

  • Posts:
  • Karma:
Wow! I hadn't followed this thread in a while either and am sure glad I just peeked in! This looks great and further extends the blogging facility in Joomla many times over - wordpress users will love it!

Question - how hard would it be to have the avatar image display in line with the content title instead of below it?

q./

Re:CBAuthorBot Hack - Show CB Avatar in articles 5 years, 5 months ago #20838

  • Posts:
  • Karma:
designguru wrote:

Question - how hard would it be to have the avatar image display in line with the content title instead of below it?


Honestly, I haven't looked into the code in a while. It is probably possible, but I don't know specifically how to do it.

Re:CBAuthorBot Hack - Show CB Avatar in articles 5 years, 5 months ago #20865

  • Posts:
  • Karma:
designguru wrote:


Question - how hard would it be to have the avatar image display in line with the content title instead of below it?

q./


Yes, very simple. Instead of adding the image to $row->text, add it to $row->title.

function CBAuthorBot (&$row, &$params, $page) {


$row is passed by reference (we are working with the actual variable, not a copy) to CBAuthorBot so that it can be modified before printed on the page.

In CBAuthorBot we are modifiying $row->text to place the image at the beginning of the text (Content Item body).
To place the image in the title would be just to modify $row->title instead.

Re:CBAuthorBot Hack - Show CB Avatar in articles 5 years, 5 months ago #20870

  • Posts:
  • Karma:
fwd wrote:
designguru wrote:


Question - how hard would it be to have the avatar image display in line with the content title instead of below it?

q./


Yes, very simple. Instead of adding the image to $row->text, add it to $row->title.

function CBAuthorBot (&$row, &$params, $page) {


$row is passed by reference (we are working with the actual variable, not a copy) to CBAuthorBot so that it can be modified before printed on the page.

In CBAuthorBot we are modifiying $row->text to place the image at the beginning of the text (Content Item body).
To place the image in the title would be just to modify $row->title instead.


I'm not sure that will work. I think the code to display $row->title is already executed before this mambot is activated. I could be wrong though.
Time to create page: 0.93 seconds