| 
Welcome, Guest

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

TOPIC: CBAuthorBot Hack - Show CB Avatar in articles

Installation 5 years, 6 months ago #24570

  • Brat
  • Brat
  • OFFLINE
  • Senior Boarder
    Senior Boarder
  • Posts: 67
  • Karma: 6
Hello all. I found this wonderful thread, and couldn't find mention of the proper way to install this outstanding mambot.

Simply put, create an associated XML file, and take this file along with the version of the CB Author bot that you want, and create a ZIP file with these two. Then, all you simply need to do is install this bot normnally just as you would any other mambots.

For your reference, I've uploaded a sample ZIP bundle that you can use. Of course, open it, make sure that the enclosed XML and CBAuthorbot.php files are suitable for your specific installation. Edit these however you see fit. Hope this helps someone!

Regards,
Brat.

Attachment CBAuthorbot.zip not found



Post edited by: Brat, at: 2006/11/13 22:15
Attachments:

Mamblog and CB Author bot 5 years, 6 months ago #24571

  • Brat
  • Brat
  • OFFLINE
  • Senior Boarder
    Senior Boarder
  • Posts: 67
  • Karma: 6
Someone earlier asked a question regarding implementation of this hack with Mamblog. Currently, Mamblog does not support mambots. However, it is fairly easy to hack Mamblog to include this code. I did something similar on my test installation (completely separate, as I did this before discovering this hack), and it works just fine. In fact, I'm going to borrow some code from the bot to flesh out my code (LOVE the avatar link to the profile!).

There may be a lot of complaints about Mamblog, but, to its credit, it works, it is stable, and it is fairly easy to customize the code (sorry, couldn't tolerate Joomblog).

I do believe that Mamblog may process bots in the future. In the meantime, I simply hack in the code I want.

Again, huge thanks to the original author of this bot!

Regards,
Brat.

Re:CBAuthorBot Hack - Avatar popup on mouseover 5 years, 6 months ago #24804

  • Flipsider
  • Flipsider
  • OFFLINE
  • Gold Boarder
    Gold Boarder
  • Posts: 215
  • Karma: -82
ericfoster3 wrote:
Here's a new twist to the same idea. I hacked CBAuthorBot to display the avatar in a popup when you mouseover it.

This also works in my Newest Users module, and Who Is Online module.

Check it out at my site to see what I am talking about.

Arundel Class of 1983

Hey what code do I have to implent in modules to make it work there too?
De-Karma me... if you dare...
CB Xbox Gamercard Plugin (Gone] - CB Xbox Gamercard Module (Gone)

Re:CBAuthorBot Hack - Avatar popup on mouseover 5 years, 5 months ago #26480

  • giapet
  • giapet
  • OFFLINE
  • Fresh Boarder
    Fresh Boarder
  • Posts: 7
  • Karma: -
Hi guys,

I'm trying to implement this on my website. I've got it working, but I can't seem to be able to tweak the formatting o_o I'm 99% PHP-stupid, for the record.

I'd like for the icon to show up next to the "written by" message, so that it'll look like:

[IMAGE] Written by [AUTHOR]

I tried the various code fussing that was mentioned in this thread as much as I dared, but I couldn't get it to work out that way.

Most of my posts on the site open with an image, so it always winds up being the icon and then the first image, which looks funny ^^; I'd like to find a way to get this to work out (...without having to just throw a couple of line breaks up at the top of every article).

Thanks very much for any help!

Re:CBAuthorBot Hack - Avatar popup on mouseover 5 years, 5 months ago #26700

  • houbahop
  • houbahop
  • OFFLINE
  • Expert Boarder
    Expert Boarder
  • Posts: 98
  • Karma: 9
Hello,

I have ported this avatar hack to mamblog for my purpose and I have seen that some users here were interested.

in mamblog.html.php find : <td valign="top" colspan="4">

then add before echo $blog->text; ?>

			  // modif pour inclure l'avatar CB
global $database, $mosConfig_live_site;
$query = "SELECT avatar FROM #__comprofiler WHERE user_id = $blog->created_by AND avatarapproved = '1'";
$database->setQuery( $query );
$avatar = $database->loadResult();
$avatarlink = "";
$txt = "";
if ( $avatar ) {
$avatarlink = $mosConfig_live_site.'/images/comprofiler/tn'.$avatar;
$txt = "<a href=\"".sefRelToAbs('index.php?option=com_comprofiler&task=userProfile&user='.$blog->created_by)."\"><img src=\"$avatarlink\" HSPACE=\"5\" border=\"0\" align=\"left\" class=\"authorimg\" /></a>";
echo $txt;
}
// fin modif avatar CB



To activate this to work, you need to make a link like that :

vith SEO activated:
www.yoursite.com/component/option,com_mamblog/task,show/action,all/


I would be happy if someone that know well the CB API to use the function to create the page navigation could help me with that.

I ask that because currently if the total number of blogs is more than the number of blog that must be show (variable setup in the backend), only the firsts blogs are shown, then there is for each other ones a text link that points to them.

My aim is to change this and put a link to have the next X blogs that reloads the page wich new ones.

Well, I hope that will be no issues with that. It works well on my computer with the last joomla and akocomment 2.0 installed. Please make a backup of the file before to update it in case of..


Houbahop.


EDIT :

After a few hours of work I have added the call to mosPageNav class to have some links to browse ALL the blogs.
It seem to work fine, however some areas of the code are dark for me and I wouldn't be surprised if I had broken some features. However until now I have no problem. Contact me to have the file if you want to test it.

the next feature I will add will probable be the number of hits of each blog.



Post edited by: houbahop, at: 2006/12/11 03:06

Re:Installation 5 years, 5 months ago #27566

  • KurtSteiner
  • KurtSteiner
  • OFFLINE
  • Platinum Boarder
    Platinum Boarder
  • Posts: 533
  • Karma: 24
Brat wrote:
Regards,
Brat.

Attachment CBAuthorbot.zip not found



Post e



Hello Brat,
many thanks for putting most of the hacks together


To all,

through this Bot i got the avatar in the content, but it seems that some avatars are to big, so i would prefear only to show the Thrumpnail version.

Have anybody implemented this?
sunny regards from Germany

BERND (Kurt Steiner)
------------------------------------------------------------
www.moveGreen.de
Business Club for renewable energy, mobility and environment


VOTE for my CB 1.2 + GroupJive driven website on Financial Times
Time to create page: 0.79 seconds