Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
using default avatar

 
Reply to topic    Forum Index » Help View previous topic
View next topic
using default avatar
Author Message
skrubbles



Joined: 09 May 2006
Posts: 11

Post using default avatar Reply with quote
First off, thanks for a MySql version of Cutenews! Smile



I'm able to upload an image as an avatar perfectly fine. The image shows up in my profile so I know its linking correctly. The problem I'm having is that when I go to add news it doesn't use that avatar by default. I still have to link to it in the avatar (optional) area. I imagine there's a solution to this, just don't know what it is.



Thanks in advance.
Tue May 09, 2006 9:52 am View user's profile Send private message
Guest








Please login to hide the ads.

FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2801
Location: Germany

Post Reply with quote
Try this:



Open inc/addnews.mdu and change this:

Code:
<input onchange="showpreview(this.value, 'previewimage')" tabindex="2" type="text" name="avatar" value="">




to this:

Code:
<input onchange="showpreview(this.value, 'previewimage')" tabindex="2" type="text" name="avatar" value="<?=$config_path_userpic_upload.'/'.$member['username'].'.'.$member['avatar']; ?>">



Last edited by FI-DD on Tue May 09, 2006 10:26 pm; edited 1 time in total
Tue May 09, 2006 5:16 pm View user's profile Send private message
skrubbles



Joined: 09 May 2006
Posts: 11

Post Reply with quote
I figured it would be something in there, but its still not working. This is the code I had before the change:



Code:
<fieldset id="avatar"><legend><?=$echo['avatar']; ?></legend>

<input onchange="showpreview(this.value, 'previewimage')" tabindex="2" type="text" name="avatar" value="">

<img name="previewimage" src="skins/images/blank.gif" align="left" style="margin: 5px;">

</fieldset>




and this is with your new code:



Code:
<fieldset id="avatar"><legend><?=$echo['avatar']; ?></legend>

<input onchange="showpreview(this.value, 'previewimage')" tabindex="2" type="text" name="avatar" value="<?=$member['avatar']; ?>">

<img name="previewimage" src="skins/images/blank.gif" align="left" style="margin: 5px;">

</fieldset>




It did something... but didn't fix the problem. On the right track though. What it did was put the word "jpg" into the avatar(optional) field on my add news page. Any thoughts? Thanks btw Smile
Tue May 09, 2006 6:07 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2801
Location: Germany

Post Reply with quote
I changed my code above. Please try again.
Tue May 09, 2006 10:27 pm View user's profile Send private message
skrubbles



Joined: 09 May 2006
Posts: 11

Post Reply with quote
Sweet! Works great now. Thank you
Tue May 09, 2006 11:16 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    Forum Index » Help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.