cotonti.com : Noavatar, how about noimage? https://www.cotonti.com Neueste Themenbeiträge Cotonti en Mon, 02 Feb 2026 19:46:33 -0000 TwistedGA Do, 16 Apr 2009 03:03:27 -0000 CorpQuid
Yes that worked great, Thank You!

I know core hacking is not a problem it’s just back with Seditio I had so many core hacks that even for the minimal updates Seditio went through it was a pain so now with Cotonti I have been shying away from them!]]>
Do, 16 Apr 2009 02:59:38 -0000
TwistedGA
I know a lot of people don't like altering anything but template files and most probably don't have an appropriate program to do so, I'll try to keep this in mind from now on.. :-)]]>
Do, 16 Apr 2009 02:40:40 -0000
Kingsley Do, 16 Apr 2009 02:35:41 -0000 TwistedGA
Here is the SQL to run should you not want to core hack it in. Which by the way, are very uninvasive and easy to uninstall if you do it like you should and make backups, not hard. There is absolutely nothing wrong with corehacking.

UPDATE sed_users SET user_photo='datas/defaultav/blank2.png' WHERE user_photo='';
ALTER TABLE sed_users CHANGE user_photo user_photo varchar(255) NOT NULL default 'datas/defaultav/blank2.png';
]]>
Do, 16 Apr 2009 02:16:20 -0000
CorpQuid
I can not find the template that you mentioned "Xtemplate by medar" can you share the logic that you have so that we can implement this in our own templates? Or am I miss-understanding you?

Lissbol,

I noticed your suggestion is for the Avatar, would we just change the paths and such to reflect for the photo? The avatar currently works fine out of the box Cotonti install, it's the Photo thats not showing.

Kingsley,

The way they are suggesting I believe is much better so lets wait for them to reply, this way we do not have to core hack our installs. :-)]]>
Do, 16 Apr 2009 02:01:03 -0000
Kingsley
I tried it with the image provided by Twisted and with one I made myself. Everytime I get the red cross.
even tried to do it with blank.png.

Followed twisted post to the letter.

@esclkm

If you have a better way, please share it with us..]]>
Mi, 15 Apr 2009 15:02:27 -0000
esclkm Mi, 15 Apr 2009 12:02:02 -0000 CorpQuid
http://www.cotonti.com/datas/users/blank2_252.png

Download that image and put it in the datas/defaultav/ folder and you should be all set.

You need to either rename the image to blank2.png or you need to modify the code twisted gave above to

$image = 'datas/defaultav/blank2_252.png';
]]>
Mi, 15 Apr 2009 05:29:45 -0000
Kingsley # TwistedGA : Ahhh, my bad. I'll write ya some code for it later.

Open up your functions.php and search for:

	elseif($type == 'photo')
	{
		if(!empty($image))
		{
			return '<img src=https://www.cotonti.com/"'.$image.'" alt="" class="photo" />';
		}

	}

Replace with:

	elseif($type == 'photo')
	{
		if(empty($image))
		{       
                        $image = 'datas/defaultav/blank2.png';
                  }
                  return '<img src=https://www.cotonti.com/"'.$image.'" alt="" class="photo" />';
	}


You need to have blank2.png in the same folder as the blank.png for this to work. :-)

Somehow this isn't working for me. It won't display the image at all.. only get a red cross..]]>
Mi, 15 Apr 2009 04:34:24 -0000
Lissbol
Run this with phpMyAdmin, tab "SQL" :

Code:
ALTER TABLE sed_users CHANGE user_avatar user_avatar varchar(255) collate utf8_unicode_ci NOT NULL default 'datas/avatars/default.gif';

... And upload the default GIF : datas/avatars/default.gif


Optionally, you can also set this default image for the already registered members with no avatar :

Code:
UPDATE sed_users SET user_avatar='datas/avatars/default.gif' WHERE user_avatar='';

did work on the Sed engine should work on Cotonti aswell]]>
Di, 14 Apr 2009 17:56:16 -0000
simplex So if a user sees their "No Avatar" image they can click on it and load one into their profile.]]> Di, 14 Apr 2009 06:32:11 -0000 CorpQuid Thank you]]> Di, 14 Apr 2009 05:41:04 -0000 DemptD Di, 14 Apr 2009 05:35:26 -0000 TwistedGA
Open up your functions.php and search for:

	elseif($type == 'photo')
	{
		if(!empty($image))
		{
			return '<img src=https://www.cotonti.com/"'.$image.'" alt="" class="photo" />';
		}

	}

Replace with:

	elseif($type == 'photo')
	{
		if(empty($image))
		{       
                        $image = 'datas/defaultav/blank2.png';
                  }
                  return '<img src=https://www.cotonti.com/"'.$image.'" alt="" class="photo" />';
	}


You need to have blank2.png in the same folder as the blank.png for this to work. :-)]]>
Di, 14 Apr 2009 01:42:38 -0000
DemptD # pieter : I guess he ment, how to change it in Cotoni that when a user don't upload a photo, a standard one will appear.


BTW: Nicely done.

Yes, thats what i meant :)]]>
Mo, 13 Apr 2009 22:19:09 -0000
pieter

BTW: Nicely done.]]>
Mo, 13 Apr 2009 15:46:58 -0000
TwistedGA
Original and Request compared.

]]>
Mo, 13 Apr 2009 15:19:43 -0000
DemptD
Is it possible to get a "nophoto" image?]]>
Mo, 13 Apr 2009 06:42:59 -0000