×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Link to CB profile

Link to CB profile 13 years 5 months ago #12395

  • Deltafidesign
  • Deltafidesign's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 23
  • Thank you received: 0
Is there a way to link the author of the hotspot to his/her CB profile? I mean the author title in the hotspot that he/her had published to be linked to his/her CB profile

Thanks

Link to CB profile 13 years 5 months ago #12396

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Not right now. Actually you could edit the view files for this and add a link to the users that a registered.

I'll add such an option in 2.1 .

Link to CB profile 13 years 5 months ago #12398

  • Deltafidesign
  • Deltafidesign's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 23
  • Thank you received: 0
Thanks for reply Daniel,

can you also tell me what part of de source code to hack to get this feature while waiting the version 2.1?

Thanks

Link to CB profile 13 years 5 months ago #12401

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Are you a developer or do you need a step by step instructions?

Link to CB profile 13 years 5 months ago #12406

  • Deltafidesign
  • Deltafidesign's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 23
  • Thank you received: 0
Maybe if you can suggest me how and where change code would be better.

thanks

Link to CB profile 13 years 5 months ago #12411

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
If you go to components/com_hotspots/views/hotspots/tmpl/default.php (this is the single view of the hotspot)
You have a object - $this->hotspot that holds everything you need

with $this->hotspot->autoruserid you get the user id .

And in this file we just output the autor name, so you have to make a link to com_comprofiler that will be something like this
pastebin.com/S0xZwt3Y

You get the idea.
Daniel

Link to CB profile 13 years 5 months ago #12416

  • Deltafidesign
  • Deltafidesign's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 23
  • Thank you received: 0
I'm not sure hot to change it in this:

<?php

$autor = hotspotsUtils::showautor($this->hotspot->autor);

$postdate = hotspotsUtils::showdate($this->hotspot->postdate);



if ($autor != "" && $postdate != "")

echo JTEXT::_('Posted by') . ' ' . $autor . ' ' . JTEXT::_('on') . ' ' . $postdate;

elseif ($autor != "" && $postdate == "")

echo JTEXT::_('Posted by') . ' ' . $autor;

elseif ($autor == "" && $postdate != "")

echo JTEXT::_('Posted on') . ' ' . $postdate;



?>

Could you please suggest me? Thanks

Link to CB profile 13 years 5 months ago #12417

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
something like this:
pastebin.com/Uai6WP2t

Link to CB profile 13 years 5 months ago #12419

  • Deltafidesign
  • Deltafidesign's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 23
  • Thank you received: 0
should be something wrong in the syntax...

Link to CB profile 13 years 5 months ago #12422

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
pastebin.com/HdFt8SDV - this one should work. I thought that you know php, that is why I didn't bother testing the code. I've tried this one and it shows the author with a link to cb - I'm not actually sure that this is the proper link, but you'll have to figure this out on your own :)

Link to CB profile 13 years 5 months ago #12424

  • Deltafidesign
  • Deltafidesign's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 23
  • Thank you received: 0
I can confirm this worked. Thanks
  • Page:
  • 1
Time to create page: 0.197 seconds