Concerning the instructions found on this thread ( https://efiction.org/forums/index.php?topic=3305.0)...
I don't think I got it right because I tried adding the custom avatar field as you instructed and it's just not showing up in the pforile. I mean the field shows just fine in the edit bio page... but it doesn't get added to the profile at all.
I not only copied and pasted exactly what you did and then I tried to change all the info I could with the field I created.
Name: avatar
Title: avatar (enter url)
Custom Form Code:
$output .= "<div><label for='avatar'>".$field['avatar'].":</label><INPUT type='text' class='textbox' name='af_".$field['avatar']."' maxlength='250' value='".(!empty($user['af_'.$field['13']]) ? $user['af_'.$field['13']] : "")."' size='20'></div>";
Custom Profile Code:
$thisfield = "<img src="'".$field['avatar'"]."'>";
Then, in my profile.tpl file I added {avatar} where I wanted the avatar to show but it's not doing it...
http://library.suethomasfbeye.net/viewuser.php?uid=1
What did I do wrong?
Jacynthe
Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP: 5.3.3
MySQL: 5.0.91-community
The custom profile code is supposed to be:
$thisfield = "<img src="'".$field['info'"]."'>";
You changed info to avatar. Check the first part to make sure you didn't do the same anywhere there too. It's best to copy and paste code for mods to make sure you copied them correctly.
Whoever said nothing is impossible never tried slamming a revolving door.
url: https://www.potionsandsnitches.org/fanfiction
php: 7.4.33 msql: 5.6.51-community GPL
efic version: 3.5.5 latest patches: yes
bridges: none mods: challenges, tracker, story end, beta, word
I had used info and it wasn't working... and I copied as well the original code that was given but it also did not work which is why I tried changing it to see if it would fix the issue for me.
Jacynthe
Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP: 5.3.3
MySQL: 5.0.91-community
Okay I got it to work. I actually am the one who made the mistake - not in syntax but in not thinking that everytime I made a change to the custom field, that removed the URL I had inputted so.... because of that it wasn't showing an image because it didn't have a URL to show. *blush*
Sorry about that!
Jacynthe
Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP: 5.3.3
MySQL: 5.0.91-community
I have one more question, not that the field doesn't work.. but I want to modify something for it. I would like that a predefined image I upload become the default image if no URL is entered in there. And since I turned on image uploading, I guess I should be using the image field since I can't seem to delete that - I end up having both the image field for the URL AND the avatar field I created asking for a URL as well. Just ends up being confusing.
What would be the best way to do this? Using an IF/else argument?
Jacynthe
Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP: 5.3.3
MySQL: 5.0.91-community
Yep.
I tried this but all I kept getting in the user bio area was a : for the field name instead of avatar 😕
~Spikey~
my site url: http://www.fanfictionworld.org
efic version:3.5.3
*meep* I'm getting the same. A ":" showing and the avatar refuses to show up. Any ideas?
Hmmm... did you make sure not to make any typos? Cause I got mine working just fine following the instructions given by Tammy.
In the new profile field, I inputted:
Name: Avatar
Title: Avatar (enter URL here)
Field Enabled (checked box)
Type: Custom Code
Custom Form:
$output .= "<div><label for='avatar'>".$field['field_title'].":</label><INPUT type='text' class='textbox' name='af_".$field['field_name']."' maxlength='250' value='".(!empty($user['af_'.$field['field_id']]) ? $user['af_'.$field['field_id']] : "")."' size='20'></div>";
Custom Profile:
$thisfield = "<img src="'".$field['info'"]."'>";
do NOT use tinyMCE while inputting those codes or it will not work correctly.
Jacynthe
Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP: 5.3.3
MySQL: 5.0.91-community
Ha! It works, thanks so much! Seems there really was a typo somewhere in there:)
Tammy,
Could you please tell me if this coding would be right for the default image thingie?
if($userinfo['image'] == empty)
$output .= "<img src="'images/lined_noimage.gif'>";"
else $tpl->assign("image", "<img src=""".$userinfo['image'"]."">");
thanks
Jacynthe
Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP: 5.3.3
MySQL: 5.0.91-community
Obviously that didn't work so I tried something else that kinda worked but kinda not because it doesn't use the image I enter the URL of...
if(!empty($userinfo['image']))
$tpl->assign("image", "<img src="images/lined_noimg.gif>");"
else $tpl->assign("image", "<img src=""".$userinfo['image'"]."">");
I had tried using the output instead of the tpl->assign but it put the image grouped with the series - so that obviously wasn't the right thing to do!
so what should I modify to make it work? Anyone has any idea?
Jacynthe
Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP: 5.3.3
MySQL: 5.0.91-community
I DID it!!!
if($userinfo['image'])
$tpl->assign("image", "<img src=""".$userinfo['image'"]."">");
else $tpl->assign("image", "<img src="images/lined_noimg.gif>");"
Jacynthe
Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP: 5.3.3
MySQL: 5.0.91-community
