Author Topic: How to track an entry to a user  (Read 1140 times)

0 Members and 1 Guest are viewing this topic.

Offline dijam

How to track an entry to a user
« on: 03. July 2009, 23:07:25 »

got it work the other way around which means a user can see their entries (listings) but how can I track which user an entry belong to?
Country: Sweden Sweden |  OS: Unknown Unknown Browser: Unknown Unknown | View Profile

Offline Poffen

  • SOBI Team
  • Moderator
  • Sobi Hero
  • *
  • Posts: 2296
  • Reviews:

    What is it?

Re: How to track an entry to a user
« Reply #1 on: 04. July 2009, 22:09:14 »
Hi dijam,


got it work the other way around which means a user can see their entries (listings) but how can I track which user an entry belong to?

I'm not sure I understand your question. Could you explain in more detail what you want to achieve?


Regards Poffen
Joomla - 1.5.7, Sobi2 - 2.9.0.1
PHP - 5.2.4, MySQL - 5.0.51a, Apache - 2.2.8, Firefox - 3.0.3
Country: Norway Norway |  OS: Unknown Unknown Browser: Unknown Unknown | View Profile

Do you want continued ongoing development, new features and active support?
Please write a review or just vote for SOBI on JED.

Offline dijam

Re: How to track an entry to a user
« Reply #2 on: 06. July 2009, 16:08:14 »

On my business directory (I guess like many others), users sign up, log on and can list their businesses. The information they provide when they sing up doesn't neccesarly have to be the same as the ones they provide in the listing (i.e. name and email address).

Now, if I as the administrator need to contact the owner of one of these listings I have no way find out which user listed that specific listing. My information is one-way go only, which is from a user I can track all his listings, but from a listing I don't know how to find out the owner of the listing (well, unless I go through every user's listings one by one which is unreasonable).

Am I making sense?
Country: Sweden Sweden |  OS: Unknown Unknown Browser: Unknown Unknown | View Profile

Offline Poffen

  • SOBI Team
  • Moderator
  • Sobi Hero
  • *
  • Posts: 2296
  • Reviews:

    What is it?

Re: How to track an entry to a user
« Reply #3 on: 06. July 2009, 16:45:56 »
Hi again,

I think I understand what you mean.

The easiest way to find the owner of a listing is to look it up at the back end under the "Publishing Tab" of each entry.

If you want to have this information available at the front end I think you need to pull this from the database, which would require custom coding. An alternative may be to use the "Report Listing plugin", or a copy of this plugin (http://www.sigsiu.net/forum/index.php/topic,10933.0.html). This plugin can be configured to send an email to the owner of the entry by anyone viewing his/her entry at the front end.


Regards Poffen
Joomla - 1.5.7, Sobi2 - 2.9.0.1
PHP - 5.2.4, MySQL - 5.0.51a, Apache - 2.2.8, Firefox - 3.0.3
Country: Norway Norway |  OS: Unknown Unknown Browser: Unknown Unknown | View Profile

Offline Syrinx

Re: How to track an entry to a user
« Reply #4 on: 06. July 2009, 16:46:30 »
You can use this to display the listing owner's username (vcard or detail template):


<?php
$db 
=& $config->getDb();
$user = new mosUser$db ); 
$user->load$mySobi->owner );
?>

<?php echo $user->username?>


If you are using Community Builder you can show the listing owner's username, including a link to the owner's user profile by using this instead of the line above:

<a href="/index.php?option=com_comprofiler&task=userProfile&user=<?php echo $mySobi->owner ?>"><?php echo $user->username; ?></a>


« Last Edit: 06. July 2009, 16:48:22 by Syrinx »
Country: United States United States |  OS: Unknown Unknown Browser: Unknown Unknown | View Profile

Tags: