What is vldPersonals?

vldPersonals is a very easy to use dating/social software. It allows you to create a fully functioning & modern dating website in a matter of minutes. If You think it's too complicated - check vldPersonals!
Know more about how You can become a dating website owner

What is vldCrowd?

vldCrowd.com is the biggest unofficial community of vldPersonals owners. It is a place to share ideas and thoughts about Your dating website. It is a place to answer questions and receive answers.
Do You own a vldPersonals license? Don't hesitate and join!

Connect Today

Community members help each other to take their dating websites to the next level. Can You make your vldPersonals website better? Join and find out...

Connect With More Than 500 Dating Website Owners! Sign Up Today

Moods. Tutorial. Part 2.

02/07/2010 11:56 PM
1602 1 20
This is continuation of the very popular post: Moods. Tutorial.
 
First of all I'm going to sort out previous post related questions and issues.
 
1. I did everything according to tutorial - no luck, all I can see only Edit link.
 
Oops. I forgot to mention that original icon set doesn't have Edit.gif in it. I had to create it myself. Please download it right from vldCrowd: http://www.vldcrowd.com/media/moods/Edit.gif and put to your moods folder.
 
2. I don't have mod_rewrite on my server and that's why seo-friendly url "Click to edit" leads me to nowhere.
 
I'm sorry, I thought every hosting has mod rewrite these days. My bad.
Please instead of {virtual_path}account/profile/mood/ use {virtual_path}index.php?m=account_profile&group=mood
 
3. I don't want to display Moods group at profile groups tabs because I already have it displayed as graphic icon.
 
We have to do same thing as with General group, if you noticed it it's not displayed at account_home in field group tabs.
Open your account_home.tpl and replace both occurrences of <!-- IF group_label != "general" --> with <!-- IF group_label != "general" AND group_label != "mood" -->
 
4. I installed your mod and can't see anything when I visit member's profile page
 
Oh yes, vldP v.2.5.5 doesn't use member_sections_card.tpl at member_profile page, hence you have to edit member_profile.tpl too. Add this anywhere at the file but outside of profile groups, fields loop:
Text

<div style="background: url('{top.virtual_tpl_path}{session.template}/media/moods/<!-- IF profile_field_mymood_value -->{profile_field_mymood_value}<!-- ELSE -->Question<!-- ENDIF -->.gif') no-repeat; width:93px; height:30px;">&nbsp;</div>
 
Play with different locations and fine the best place. Placing somewhere under profile photo could be good idea.
 
Here comes main part of tutorial.
 
How to dynamically display moods on selection
1. Open your account_profile.tpl and find <!-- ELSEIF field_type = "combo" -->
Add right after it:
Text

<!-- IF field_label == "mymood" -->
 <select class="select" onchange="display_mood('{top.virtual_tpl_path}{session.template}/media/moods/');" id="field_{field_label}" name="{field_label}">
<option value="">{lang:"core","user_field_none"}</option>                                                                                           {dropdownlist:field_items,field_value}         </select><div id="mood_div">&nbsp;</div>
<!-- ELSE -->
 
Then find <!-- ELSEIF field_type = "birthday" --> and add right before it:
Text

<!-- ENDIF -->
 

2. Scroll your account_profile.tpl to bottom and add right before
<!-- ENDIF -->
<!-- INCLUDE ...
this code:
 
Javascript

<script type="text/javascript" >
$(document).ready(function(){
 display_mood('{virtual_tpl_path}{session.template}/media/moods/');
});
// display mood icon
function display_mood(url)
{
 var mood = $('select#field_mymood option:selected').text();
 $('#mood_div').attr('style', 'background: url(' + url + mood + '.gif) no-repeat; width:93px; height:30px;');
}
 </script>
 

3. Go and try to change your mood.

Comments

DDNY

  • Posted on 07/26/2011 03:12 AM
I am running this on 2.7 and it seems to be working fine.

jackal

  • Posted on 07/25/2011 04:55 PM
Nice mod and thank for sharing, but not many people/member take that mod serious. How about with take away the drop down box and replace it with a text box and turn it into a "shout out/what on your mind mod"? Make it a little more useful...

definitive

  • Posted on 07/25/2011 10:30 AM
Can anyone confirm this works on 2.7?

melindaspenpals

  • Posted on 02/25/2011 05:54 PM
I seem to have the same problem is mario. I am on VLD 2.5.6. I got everything working except when I click to edit my mood all I see is the submit button and no mood to select. Was there an answer to this issue?

radioact

  • Posted on 02/17/2011 06:51 PM
Put that field in group General and not in separate group.
After that add some check at account_home.tpl and member_profile.tpl like:
<!-- IF field_label == "mymood" -->
do something here
<!-- ELSE -->
{field_value}
<!-- ENDIF -->
 
This is logic, not exact code to use.

greg

  • Posted on 02/17/2011 09:45 AM
hi ,
 
Thank you very much for the mod, but how to make it appear in the "general" and not in a separate section

radioact

  • Posted on 10/09/2010 07:26 PM
Hi Kirk, do you have set for that field and it's group Load in member's page (public) to: Yes?

gugu

  • Posted on 10/01/2010 04:47 PM
and that is your vldversion ?

Log in to leave a comment