+ Reply to Thread (include dating software, release, and patch number!)
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Default No Photo Images

  1. #1
    fcukbuddy
    Guest

    Default Default No Photo Images

    Hi,

    Just wondered how to get my default no photo image to display an image as per gender or sex. I have seen this on other dolphin sites and I do have images ready in my profile images folder but just can't seem to configure it I'm using Dolphin 5.60004 .

    Can anyone please advise?

  2. #2
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,642
    Blog Entries
    5

    Default

    This is some older code - but should get you started:

    QuickMod #5 - Male/Female/Couple Images

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  3. #3
    fcukbuddy
    Guest

    Default

    Hi Smoge Thanks for the quick reply. However I can't get this to work as I think that it's for aeDating and I need to sort it For Dolphin 5.6. Is there any way to just switch it on or any other mods?

  4. #4
    fcukbuddy
    Guest

    Default

    I think the answer lies in replacing all instances of

    else
    {
    $sPhotoUrl = getTemplateIcon( 'no_photo.gif' );
    }

    with something similar to the aedating solution but just cant figure it out...
    Do you have any suggestions smoge??

  5. #5
    mark
    Guest

    Post Edit this function getTemplateIcon in utils.inc.php

    Edit this function getTemplateIcon in utils.inc.php -- DOLPHIN VERSION 5.6.4

    Replace :
    $sBase = $dir['root'] . 'templates/base/images/icons/' . $sFileName;
    $sTemplate = $dir['root'] . 'templates/tmpl_' . $tmpl . '/images/icons/' . $sFileName;
    With :
    global $p_arr;
    global $ID;
    $p_arr_sex = $p_arr;
    global $ID;
    if ( (int)$ID > 0 )
    {
    $p_arr_sex = db_arr("select Sex from Profiles where ID='$ID'");
    }

    if ( $p_arr_sex[Sex] != "" and $sFileName == 'no_photo.gif' )
    {
    if ( $p_arr[Sex]="male" )
    return $site['profileImage'] . "man.jpg";
    if ( $p_arr[Sex]="female" )
    return $site['profileImage'] . "woman.jpg";
    }
    else
    {
    $sBase = $dir['root'] . 'templates/base/images/icons/' . $sFileName;
    $sTemplate = $dir['root'] . 'templates/tmpl_' . $tmpl . '/images/icons/' . $sFileName;
    }
    Last edited by mark; 09-01-2007 at 09:52 PM.

  6. #6
    fcukbuddy
    Guest

    Default

    Hi mark, thanks for reply

    However this does not seem to work except for it does display the man.jpg on all profiles male or female and also changes all females to male in personal discription...

  7. #7
    mark
    Guest

    Post I thought It could be easy to spot the problem

    I purposely put a problem here , if you are coder you can easily see it :

    if ( $p_arr[Sex]="male" )
    return $site['profileImage'] . "man.jpg";
    if ( $p_arr[Sex]="female" )
    return $site['profileImage'] . "woman.jpg";

    It should be this :

    if ( $p_arr[Sex]=="male" )
    return $site['profileImage'] . "man.jpg";
    if ( $p_arr[Sex]=="female" )
    return $site['profileImage'] . "woman.jpg";

  8. #8
    mark
    Guest

    Post how to enable for Couple

    mark: hi
    *** Waiting for fcukbuddy to connect
    *** fcukbuddy's IC window is open
    fcukbuddy: hi
    mark: did you see my reply to this thread just now
    mark: http://www.modmysite.com/bugs-dolphin-5-6-4/6619.htm#post26219
    mark:
    mark: have a nice day
    fcukbuddy: wow you reply quick I see == instead of just =
    mark:
    fcukbuddy: so that changed should work , I 'm no where near calling
    myself a programmer lol
    mark: yes that should work fine
    mark:
    fcukbuddy: so how would I get it to show couples.jpg?
    mark: you could use the variable $p_arr[ProfileType]
    mark: I'll put my reply in the thread
    code with couple :
    global $p_arr;
    global $ID;
    $p_arr_sex = $p_arr;
    global $ID;
    if ( (int)$ID > 0 )
    {
    $p_arr_sex = db_arr("select Sex,ProfileType from Profiles where ID='$ID'");
    }

    if ( $p_arr_sex[Sex] != "" and $sFileName == 'no_photo.gif' )
    {
    if ( $p_arr[ProfileType]=="couple" )
    return $site['profileImage'] . "couple.jpg";
    if ( $p_arr[Sex]=="male" )
    return $site['profileImage'] . "man.jpg";
    if ( $p_arr[Sex]=="female" )
    return $site['profileImage'] . "woman.jpg";
    }
    else
    {
    $sBase = $dir['root'] . 'templates/base/images/icons/' . $sFileName;
    $sTemplate = $dir['root'] . 'templates/tmpl_' . $tmpl . '/images/icons/' . $sFileName;
    }

  9. #9
    fcukbuddy
    Guest

    Default

    Works well in view profile but any chance to get it to work on top members, browse and search results?

  10. #10
    mark
    Guest

    Post No Photo Image System Wide Replacement

    No Photo Image System Wide Replacement -- DOLPHIN VERSION 5.6.4

    1) Edit this function getTemplateIcon in utils.inc.php

    Replace :

    $sBase = $dir['root'] . 'templates/base/images/icons/' . $sFileName;
    $sTemplate = $dir['root'] . 'templates/tmpl_' . $tmpl . '/images/icons/' . $sFileName;
    With :

    function getTemplateIcon( $sFileName,$memberID = 0)
    {
    global $site;
    global $dir;
    global $tmpl;


    global $p_arr;

    $p_arr_sex = $p_arr;
    global $ID;
    if ( (int)$ID > 0 )
    {
    $p_arr_sex = db_arr("select Sex,ProfileType from Profiles where ID='$ID'");
    }
    if ( (int)$memberID > 0 )
    {
    $p_arr_sex = db_arr("select Sex,ProfileType from Profiles where ID='$memberID'");
    }

    if ( $p_arr_sex[Sex] != "" and $sFileName == 'no_photo.gif' )
    {
    if ( $p_arr_sex[ProfileType]=="couple" )
    return $site['profileImage'] . "couple.jpg";
    if ( $p_arr_sex[Sex]=="male" )
    return $site['profileImage'] . "man.jpg";
    if ( $p_arr_sex[Sex]=="female" )
    return $site['profileImage'] . "woman.jpg";
    }
    else
    {
    $sBase = $dir['root'] . 'templates/base/images/icons/' . $sFileName;
    $sTemplate = $dir['root'] . 'templates/tmpl_' . $tmpl . '/images/icons/' . $sFileName;
    }
    2) Edit this function get_member_thumbnail in design.inc.php

    replace :
    $sFileName = getTemplateIcon( 'no_photo.gif');
    with :
    $sFileName = getTemplateIcon( 'no_photo.gif',$ID);
    Last edited by mark; 09-02-2007 at 07:49 PM.

+ Reply to Thread (include dating software, release, and patch number!)
Page 1 of 2 1 2 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Photo Album Default Permissions
    By Nitrofish in forum Boonex Dolphin 7
    Replies: 0
    Last Post: 05-31-2010, 02:21 AM
  2. Photo Upload Failed (Photo Error) - Photo Module
    By Page7 in forum Boonex Dolphin 7
    Replies: 4
    Last Post: 03-24-2010, 10:28 PM
  3. Default Photo selected in Profile deleted?
    By tuba in forum Dolphin General Discussion v6.00 and above
    Replies: 2
    Last Post: 03-27-2008, 11:54 PM
  4. Add senders / requesters photo to private photo request email.
    By Prometheus in forum Free Mod Exchange
    Replies: 0
    Last Post: 06-04-2007, 01:40 PM
  5. After clicking Submit photo goes back to photo area
    By SomeGuy123 in forum General Issues, Comments, Questions
    Replies: 0
    Last Post: 03-24-2007, 03:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts