Advertisement:

Author Topic: At _CONEJO: More Publisher Information in ads - please help  (Read 1397 times)

wedeen

  • Newbie
  • *
  • Posts: 14
At _CONEJO: More Publisher Information in ads - please help
« on: November 04, 2011, 06:12:33 pm »
Hello to the admin and the osclass experts,

it would be very great, if a publisher can show more details.
Important is the Telephon-No and the Website

Is there a possibility to do this without the need to create a new database request with joins?
The publisher name and email comes not about joins, osclass write this data once again in the item-table.

Greetings, Verena
« Last Edit: November 07, 2011, 12:04:30 pm by wedeen »

wedeen

  • Newbie
  • *
  • Posts: 14
Re: More Publisher Information in ads
« Reply #1 on: November 07, 2011, 12:03:54 pm »
@ _CONEJO:

Can you please help me to get an answer? You know your application as best and I think only you can help by answers like this!?

I just need an idea, I think the rest I can do by myself and then I give the solution to the rest in this forum. I read that other people want to know this too. I want to help but first I need you help to do this.

Many thanks,
Verena

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: At _CONEJO: More Publisher Information in ads - please help
« Reply #2 on: November 07, 2011, 01:37:48 pm »
Hi wedeen,

Please be patient, I can not be 24hours on the forum nor working on OSClass.

Anyway, there's a problem with what you are asking for. Not every user has telephone number nor website. Only registered users do. If you allow unregistered users to publish ads on your website, they will not have that information. We have a helper for user data, so you will be able to use it with a little modification.

modify item.php (on your theme folder), Add this on the first line

<?php View::newInstance()->_exportVariableToView('user'User::newInstance()->findByPrimaryKey(osc_item_user_id())); ?>

Some check are required to be placed in order to avoid errors of no-data / no-existing user, but if you only allow registered user to publish ads, it should not fail.

Later, you could access telephone data with the user helper


osc_user_phone
();
osc_user_website();


wedeen

  • Newbie
  • *
  • Posts: 14
Re: At _CONEJO: More Publisher Information in ads - please help
« Reply #3 on: November 08, 2011, 07:49:56 pm »
Hi Coneo,

wow, many thanks, this is great!! It works super!

Greetings, Verena

chofi

  • Full Member
  • ***
  • Posts: 211
Re: At _CONEJO: More Publisher Information in ads - please help
« Reply #4 on: April 24, 2012, 01:34:59 am »
@Conejo

  Como darle el vinculo para que envie a la pagina del anunciante , he colocado esto pero no funciona
 <a href="<?php echo osc_user_website();?>"></a> , desaparece todo

 Saludos
 Chofi