Hi all

This tip is kind of similar to Jen's tip on inserting messages to all members on their profile page.

However, what i wanted to do here was target specific member types, in this case Legal Recruiters, with a 'call-to-action' that applied only to them (I did search but couldn't find anything similar - apologies if it's out there already)

I wanted an icon prompting them to post jobs inserted on profile pages of members that answered my profile question "Type of Member" with the answer "Legal Recruiter".

This code does just that, and goes in your custom code box:

<script type="text/javascript">
x$(document).ready(function() {  
    if (x$('.module_about_user dl dd:contains("Legal Recruiter")').length > 0) {
        x$('.module_user_thumbnail').after('<div style="width:173px;background:transparent;padding-left:6px;"><a target="_blank" href="http://yourURL.com"><img class="align-full" src="http://yourURL.com/image.png" /></a></div>');
    }
});
</script>


What we're doing here is looking for specific content with the Profile Information module (module_about_user dl dd) on each member's profile page. The highlighted blue designates this, in this example Legal Recruiter.
Once we've determined this we're inserting something after the profile avatar picture (.module_user_thumbnail) in this instance some html that styles a div, inserts a picture (http://yourURL.com/image.png) that links to a specific url (http://yourURL.com).

You can see it in action here. And to make sure it works and not displaying elsewhere, not in action here.

This script could be adapted for all sorts of things, including additional categories for members that already have the one category assigned to them using the recently launched Ning category badges.

Hope this is of use

SP

More tips on my page

Tags: Target specific member types

Views: 692

Reply to This

Replies to This Discussion

quick question. SP

If we want to Add same  IMage to TWO group then what will be the code here

"contains("Legal Recruiter")').length > 0) { "

 

Comma or Any thing?

pretty much, think this should do it

if (x$('.module_about_user dl dd:contains("Legal Recruiter"), .module_about_user dl dd:contains("Another Option")').length > 0) {

SP

Thanks SP,

i want to change location of this image and want to adjust it below Member Name,City Country.

Code ?

you have a unique style of asking, don't you, imail? :-)

there are about a thousand different variants of what could be done with this code. if you wanted to, you could make the search box pink if a member answered a certain question in a certain way.

what you're asking for is probably something like this:

<script type="text/javascript">
x$(document).ready(function() {  
    if (x$('.module_about_user dl dd:contains("Legal Recruiter")').length > 0) {
        x$('.xg_widget_profiles_profile_show dl.last-child dt.fn span ul.member_detail').after('<div style="width:173px;background:transparent;padding-left:6px;"><a target="_blank" href="http://yourURL.com"><img class="align-full" src="http://yourURL.com/image.png" /></a></div>');
    }
});
</script>

I'll let NCs get creative with this by themselves with the variations from now on. Enjoy....

SP

This code you shared would be very interesting to my network if I could change it to verify the quantity of groups a user has joined, do you know if this parameter is possible to be read?

Thanks.

not off the top of my head, sorry

Could you add multiple different codes? Or is it only going to show one at a time?

yes, you can

Wonderful:) I'm going to have to play with this - awesome tip, thank you:)

you're welcome

First class. Love what you guys do with your network and am really grateful for your generosity. Thank you.

Glad you like it, Hugh, I hope you can use and modify the script to do some awesome things on your site,
Best
SP

RSS

Latest Activity

Allison Leahy replied to Jen's discussion 'Jen's Running List - Updated 4/6/2013' in the group The Sandbox
"Thanks, Jen. I had hoped the glitch was related to today's release or additional work on the…"
7 minutes ago
Allison Leahy replied to Riccardo Rossini's discussion 'problem in redirecting NING 3.0'
"Hi Riccardo, Appreciate the update here -- and your contribution to the investigation. I'm…"
22 minutes ago
Suzie Nielsen replied to Phil McCluskey's discussion 'Site Manager Updates for Ning 3.0 Networks'
"Awesome! Great news! his will work out great for me!"
1 hour ago
susana replied to John McDonald's discussion 'Free Ning 3.0 Sandbox Networks'
"bien, lo que yo quiero  saber es a qué sitio debo ir para obtener el Plan Sandbox…"
2 hours ago
Profile Iconsusana, Brother Richard and 3 other members joined Allison Leahy's group
Thumbnail

The Sandbox

Join The Sandbox to experiment with Ning 3.0 now!The Ning Team will be triaging bug reports and…See More
3 hours ago
Fire-Tech replied to Jen's discussion 'Jen's Running List - Updated 4/6/2013' in the group The Sandbox
"No prob. I have been equally frustrated and had to work on other things. But today...we got access…"
3 hours ago
Fire-Tech replied to Phil McCluskey's discussion 'Site Manager Updates for Ning 3.0 Networks'
"Very very nice! Just the head tag alone makes me smile :) Great job...keep 'em coming!"
3 hours ago
Phil McCluskey replied to Phil McCluskey's discussion 'Site Manager Updates for Ning 3.0 Networks'
"Hi Ningaholic, We've started working on Groups; there's still a few weeks to go, but they…"
3 hours ago

© 2013   Created by Ning.

Badges  |  Report an Issue  |  Terms of Service