 |
 |
 |
 |
 |
| Author |
Message |
skrubbles
Joined: 09 May 2006 Posts: 11
|
|
using default avatar |
|
First off, thanks for a MySql version of Cutenews!
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 |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
|
Try this:
Open inc/addnews.mdu and change this:
 |  | <input onchange="showpreview(this.value, 'previewimage')" tabindex="2" type="text" name="avatar" value=""> |
to this:
 |  | <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 |
|
 |
skrubbles
Joined: 09 May 2006 Posts: 11
|
|
|
|
I figured it would be something in there, but its still not working. This is the code I had before the change:
 |  | <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:
 |  | <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 
|
|
| Tue May 09, 2006 6:07 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
|
I changed my code above. Please try again.
|
|
| Tue May 09, 2006 10:27 pm |
|
 |
skrubbles
Joined: 09 May 2006 Posts: 11
|
|
|
|
Sweet! Works great now. Thank you
|
|
| Tue May 09, 2006 11:16 pm |
|
 |
|
|
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
|
|
 |
 |
 |
|