Skip to Content Skip to Menu

CBAuthorBot Hack - Show CB Avatar in articles

  • ccdog
  • ccdog
  • OFFLINE
  • Posts: 21
  • Thanks: 0
  • Karma: 21
18 years 2 months ago #17634 by ccdog
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!

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

  • redlaguna
  • redlaguna
  • OFFLINE
  • Posts: 21
  • Thanks: 0
  • Karma: 9
18 years 2 months ago #17801 by redlaguna
Replied by redlaguna on topic Re:CBAuthorBot Hack - Show CB Avatar in articles
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?

:dry:

Martin

¡mas vale no saber!

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

18 years 1 month ago #20580 by designguru
Replied by designguru on topic Re:CBAuthorBot Hack - Show CB Avatar in articles
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./

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

  • ccdog
  • ccdog
  • OFFLINE
  • Posts: 21
  • Thanks: 0
  • Karma: 21
18 years 1 month ago #20838 by ccdog
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.

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

  • fwd
  • fwd
  • OFFLINE
  • Posts: 6
  • Thanks: 0
  • Karma: 2
18 years 1 month ago #20865 by fwd
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.

[code:1]function CBAuthorBot (&$row, &$params, $page) {[/code:1]

$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.

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

  • ccdog
  • ccdog
  • OFFLINE
  • Posts: 21
  • Thanks: 0
  • Karma: 21
18 years 1 month ago #20870 by ccdog
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.

[code:1]function CBAuthorBot (&$row, &$params, $page) {[/code:1]

$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.

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

Moderators: beatnantkrileon
Powered by Kunena Forum