Ad Owner Nice Name | Support Questions | Support Forum

A A A

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Ad Owner Nice Name
January 11, 2018
11:00 am
John Green
Member
Members
Forum Posts: 9
Member Since:
July 10, 2017
sp_UserOfflineSmall Offline

Hi, I am trying to modify the reply to ad page by adding a message form from another plugin. For this to work I need to get the “ad owner nice name”. Is this possible?

Thanks for your time.

January 12, 2018
10:00 am
AWPCP Support
Moderator
Members

Moderators
Forum Posts: 5069
Member Since:
September 4, 2013
sp_UserOfflineSmall Offline

Hi John,

Thank you for contacting us regarding this issue. I’m happy to help here.

Can you tell me a bit more? I’m not familiar with the term ‘ad owner nice name’ — can you please explain that to me?

Please let me know.

January 12, 2018
10:07 am
John Green
Member
Members
Forum Posts: 9
Member Since:
July 10, 2017
sp_UserOfflineSmall Offline

Hi,

On the Reply to Ad page there is the following code:

<?php $msg = __(‘You are responding to Ad: %s.’, ‘another-wordpress-classifieds-plugin’); ?>
<p><?php echo sprintf($msg, $ad_link); ?></p>

I actually want to get $adcontact_name and not $ad_link.

But if I replace $ad_link with $adcontact_name it doesn’t give me anything.

Essentially I am placing a shortcode on that page to provide a message form from another plugin. That shortcode needs $adcontact_name but I can’t get it to work.

The shortcode I am trying to use is this:

echo do_shortcode(“[fep_shortcode_new_message_form to=$adcontact_name]”);

Sorry I am not a very educated person when it comes to php etc.

Any help would be appreciated.

January 13, 2018
5:39 am
John Green
Member
Members
Forum Posts: 9
Member Since:
July 10, 2017
sp_UserOfflineSmall Offline

Ok, further to the last post this is the current problem…

I am adding a shortcode from another plugin to the Single Ad page layout. I have ticked the box to enable Wordpress shortcodes and it is working ok. However, when I place $adcontact_name inside the shortcode it does not give an output. I have tested the shortcode with other user nicenames and it works perfectly.

This is the shortcode:

[fep_shortcode_new_message_form to=$adcontact_name]

So the shortcode is working ok but it is not getting $adcontact_name.

Any ideas or any other options I can use?

January 16, 2018
7:12 am
AWPCP Support
Moderator
Members

Moderators
Forum Posts: 5069
Member Since:
September 4, 2013
sp_UserOfflineSmall Offline

Hi John,

Thank you for contacting us regarding this issue. 

I’ll need to ask the developer the specifics on this since I’m not familiar.  What plugin is the shortcode you are using from? 

Please let me know.

January 16, 2018
7:15 am
John Green
Member
Members
Forum Posts: 9
Member Since:
July 10, 2017
sp_UserOfflineSmall Offline

Hi, the plugin is front-end pm pro.

Thanks for your time.

January 16, 2018
7:18 am
AWPCP Support
Moderator
Members

Moderators
Forum Posts: 5069
Member Since:
September 4, 2013
sp_UserOfflineSmall Offline

Thanks, John. I’ll let you know as soon as I hear back. 

January 16, 2018
9:23 am
AWPCP Support
Moderator
Members

Moderators
Forum Posts: 5069
Member Since:
September 4, 2013
sp_UserOfflineSmall Offline

Hi John,

I have a response for you from the developer. He said:

The customer mentioned adding the shortcode to two different parts of the website and the solution is different for each case.
 
Reply to Ad page
 
If the customer wants to use the shortcode on the Reply to Ad page, he can add the following to the another-wordpress-classifieds-plugin/frontend/templates/page-reply-to-ad.tpl.php template:
 
<?php $listing = awpcp_listings_collection()->get( $hidden[‘ad_id’] ); ?>
 
Then, he can use $listing->ad_contact_name to get the contact name entered when the listing was posted. I want to point out that the contact name not always matches a WordPress user’s nice name, but if registration is required on this customer’s website, it should work.
 
Alternatively, if the shortcode accepts a user_id and, again, registration is required, the customer can also use $listing->user_id to get the ID of the author.
 
Single Ad page layout
 
I assume the customer is modifying this layout from the plugin’s settings. In that case, he can use the $contact_name placeholder to get the contact name entered when the listing was posted.
 
I hope that helps. Please let me know if you have any other questions or issues!
Forum Timezone: America/Denver

Most Users Ever Online: 163

Currently Online:
13 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Johnny B: 140

godie: 120

kerdezo: 99

laburke: 94

NAIN KHAN: 93

salvig67: 84

rude: 72

purplepaula: 72

WAYTOBAYWTB52: 71

gery: 71

Member Stats:

Guest Posters: 30

Members: 37625

Moderators: 2

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 6868

Posts: 30647

Newest Members:

Volod, WINNY PUTRI LUBIS, oroxuruv, alunevu, Sivaleela, media maya, media maya, john, John, Sacha

Moderators: awpcp: 7530, AWPCP Support: 5069

Administrators: wpengine: 0, awpcp: 298

Skip to toolbar