Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

"Add friend" button anywhere

10 years 10 months ago
Licenses:
JomSocial Expired

ISSUE SUMMARY: I would like to add the "Add Friend button" and the "Send Message" buttons in other places on my website, outside the Jomsocial community section. For example, I would like to add those buttons in my K2 articles, in the "About the Author" section.

For example I tried to pull those lines of code from the "Hovercard.php" file, and paste it in the items.php file of my K2 template but it does not seem to be working:

<!-- Send Message button -->

            <?php if ( $config->get('enablepm') ) { ?>

                <a href="javascript:" class="joms-button--neutral joms-button--small" onclick="joms.api.pmSend('<?php echo $profile->id;?>');">

                    <?php echo JText::_('COM_COMMUNITY_INBOX_SEND_MESSAGE'); ?>

                </a>

            <?php } ?>

Could you please let me know how I can add those buttons in other places of my Joomla site? Thank you for your help.


STEPS TO REPLICATE:
1
2
3
4
5
RESULT
EXPECTED RESULT
BROWSER

10 years 10 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi,

this is really tricky, because you should load jomsocial library first :

$corefile = JPATH_ROOT . '/components/com_community/libraries/core.php';

and define the profile id parameter
$profile = CFactory::getUser(THE_USERID);

and then load the javascript library and CSS file. I cant help you too much, because this is not easy hack.. I suggest you search by your self..

10 years 10 months ago
Licenses:
JomSocial Expired

Hi,

Thank you for your answer.

Where can I search by myself? Is there a documentation available for this?

Thank you

10 years 10 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Louis,

you should trace the code by yourself, you should have good knowladge with programming and this is the doc documentation.jomsocial.com/wiki/Developers_Documentation , the doc for hack method is very limited anyway.

thank you

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW