Forum

JiFile for Joomla!

JIFile
JiFile is a component for Joomla! that allows you to index file contents (PDF, DOC, etc..) to perform searches in them.

Learn more...  Demo

JoomPhoto Mobile

JPhotoMobile
JoomPhoto Mobile is a component for Joomla! that allows you to share the photos from your Android device to your site Joomla.

Learn more...  Demo

iFile Framework

IFile
IFile is an open source framework written entirely in PHP, allows the indexing of textual content of a document (DOC, PDF, EXCEL, etc.) and a quick search within them.

Learn more...  Demo

Easy Language

EasyLanguage
Easy Language is a plugin for easy and immediate management of multilingual texts in every possible area of joomla, articles, components, modules, metadata, template, other components(example K2) etc.

Learn more...

Article Book Effect

Article Book Effect
View Joomla articles with the effect turns the page of a book. This plugin will display the contents of an article in Joomla as a real book or magazine, using all the benefits of HTML5

Learn more...  Demo

 

Passport photo

Passport photo
The most popular Android app that allows you to print photos cards for your documents with your Android smartphone, in a simple and intuitive way.

Learn more...

 

Crazy Shadow

Crazy Shadow
Crazy Shadow is the 3D fast-paced and fun puzzle Android game! Try to rotate and drag shapes in the position of their shadows without fail! Solve in succession all combinations of levels of the game.

Learn more...

 

Admin Countdown

Admin Countdown
Module for Joomla! 2.5 and 3.x displays in the administration part of the site, a timer with countdown of the time remaining in your session.

Learn more...  Demo

 
Welcome, Guest
Username: Password: Remember me

TOPIC: Link to Jomsocial profile from search results?

Link to Jomsocial profile from search results? 09 Oct 2012 23:59 #661

  • Byron
  • Byron's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 1
Hi,

Thanks for a great component; I'm currently trialing it with joomla 2.5, jomsocial 2.6.2 and bsmyjspace to allow each jomsocial user to create a 'homepage' where they can upload documents which are indexed and searchable by other users. Everything works fine, homepage, doc upload, indexing and jifile search via standard joomla search.

The search results have the link to the uploaded documents and the introtext, it would be a perfect search plugin if there was a link back to the jomsocial user profile associated with the document in the search results.

I know very little php but with some testing the .$pathD includes the jomsocial username (as it's within foldername location of the uploaded and indexed document), would you be able to point me in the direction of how best to achieve returning a href link back to the jomsocial profile, or whether it is even possible within a search plugin to combine the two?

Thanks in advance for any advice,

Byron
The administrator has disabled public write access.

Re: Link to Jomsocial profile from search results? 10 Oct 2012 10:07 #664

  • Antonio
  • Antonio's Avatar
  • OFFLINE
  • Administrator
  • Posts: 486
  • Thank you received: 66
Hi,
Unfortunately I do not have the time to understand how to work those components to find some solution, maybe in the near future
If you like, if it was useful, consider a donation, Thanks
Se vuoi, se ti siamo stati utili, considera una donazione, Grazie
Help us by voting our extensions on Joomla.org:
JiFile
JoomPhoto Mobile
Easy Language
The administrator has disabled public write access.

Re: Link to Jomsocial profile from search results? 10 Oct 2012 10:17 #665

  • Antonio
  • Antonio's Avatar
  • OFFLINE
  • Administrator
  • Posts: 486
  • Thank you received: 66
If you have urgent you can contact us in confidence on info[at]isapp.it
If you like, if it was useful, consider a donation, Thanks
Se vuoi, se ti siamo stati utili, considera una donazione, Grazie
Help us by voting our extensions on Joomla.org:
JiFile
JoomPhoto Mobile
Easy Language
The administrator has disabled public write access.

Re: Link to Jomsocial profile from search results? 13 Oct 2012 15:09 #684

  • Byron
  • Byron's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 1
Hi Antonio,

I got it sorted in the end, info is below for anyone who needs to edit jifile search plugin (changes the href link from the indexed document to the jomsocial profile of the user who uploaded the indexed document):

$pathD = jifilehelper::getCorrectFilename($doc->getFieldValue('path'));
// need to extract username from path, return userid from username, create link to js profile
$lastSlash=strrpos($pathD,'/',6);
$username=substr($pathD,5,$lastSlash-5);
// Return current user
$user =& CFactory::getUser($username);
// Return user id
$userid = $user->id;
// Create link to CUser object
$link = CRoute::_('index.php?option=com_community&view=profile&userid='.$userid);

and later on...

$row = array('title' => JFilterOutput::cleanText($doc->getFieldValue('name')),
//'href' => 'index.php?option=com_jifile&filename='.$pathD,
'href' => ''.$link,
'created' => $created,
'browsernav' => 0,
'section' => 'Below is an excerpt from the document, click on the link above to view the user profile and access the full document.',
'text' => $text);
$rows[] = JArrayHelper::toObject($row);

Cheers,

mr_b
The administrator has disabled public write access.
The following user(s) said Thank You: Antonio