Q/A Submission for Avatars

Is Coranto not working properly for you? Here's where to ask for support help; for best results, follow these steps:
  • - Check your core/addon documentation for possible solutions
  • - Search these forums for similar problems that have already been solved
  • - If you're still stumped, check out THIS TOPIC, and post your question in this forum!!

Moderators: Spunkmeyer, Dale Ray, SrNupsen, Bluetooth, Jackanape

Q/A Submission for Avatars

Postby Pirate Elf » Mon May 05, 2003 9:33 am

Q/A Possibly?

Many times people ask how to create an Avatar/icon with their posts,I have wrote a little faq that is very easy to follow and thought if it was good enough it could go in Q/A.


How to Display an Avatar/Icon with your news posts:
Time from start to finish: 15 mins
Things Needed: Coranto installed, Select Pic, 15 mins of time, Admin Access to your coranto, Full path information to your site

There are many methods to displaying your Icon, but I have found these two work the best. Once you feel comfortable please feel free to come up with your own method. The two methods below are very easy, but you need to make a choice of whether you want to select the icon every time you post, the icon always shows when a user posts, or you could use both like I do.

Select the Icon Everytime a User Posts

First create a new directory on your webserver called Avatars, then upload as many icons as you would like to use. (If you want an advanced feature so each user can upload their own avatars see the notes at the bottom). Once you have uploaded all the icons you wish to use, go into your coranto and create a new custom field called Avatars.


Second install select pic into your coranto directory.
Then go to Add-ons and turn it on.
Next go to Administration, then change settings. Scroll down until you find the SelectPic settings. Select the field to use as Avatars. Then select the pictures path and put the full path to your avatars directory. (If you do not know your full path check here, or with your website provider) Next Select the pictures http:// path. This is the http:// directory of your avatars so if you made the Directory under coranto, then yours might look like this http://www.yourwebsitehere.com/cgi-bin/coranto/avatars Check your own settings to be sure. The other options of select pic are a per user basis so I will not cover them.

Once you have set all that up, go to your styles and edit the style you wish to show icons, find where you want to show the icon and add the following code:

Code: Select all
     <If: Field: CustomField_Avatars>
     <img src="<Field: CustomField_Avatars>" border="0">
     <If: Else>
     </If>


That code will show your icon if you have selected one when posting, and if have not selected one then it will show a blank. If you would prefer it to say something like "No Avatar Selected" or something to that extent, then replace the code above with this one:

Code: Select all
     <If: Field: CustomField_Avatars>
     <img src="<Field: CustomField_Avatars>" border="0">
     <If: Else>
     No Avatar Selected
     </If>



The Set a User Icon for every post:

First Create a new USER field called MyAvatar. Next edit the style you wish to show the avatar, and add the following code:

Code: Select all
     <If: Field: UserField_MyAvatar>
     <img src="<Field: UserField_MyAvatar>" border="0">
     <If: Else>
     </If>


Then go to your User Preferences and put in the http:// path to the icon you wish to use. If you don't know the http:// path check your settings, or if you installed select pic it will show you the path to the icon you wish to use.

As before if you want it to show "No Avatar Selected" or something like that then post the following code:
Code: Select all
     <If: Field: UserField_MyAvatar>
     <img src="<Field: UserField_MyAvatar>" border="0">
     <If: Else>
     No Avatar Selected
     </If>


This one is by far easier because it automatically posts your icon every time you post, but some users prefer a different icon every time. So it's up to you which one you choose.


Note: Advanced method to allow users to upload their own Icons:
Install the MultiPart addon. Edit the initial Multipart settings under Administration/change settings.

Then go to Profiles and create a new Multipart Profile called Avatars. Once that is done edit the new profile called Avatars you just made. Change the full path to the full path leading to your Avatars directory, and change the http:// path to your http:// avatars directory. The rest of the settings are up to you to decide so I will not cover those. Once all that is done you should be able to upload directly to your avatars directory, and then your users can use either method you chose above.





-------------------------------

Hope this is informative, and helps out all those countless users that post every now and then about how to do avatars with coranto. :-)
Nichts ist für dich
Nichts war für dich
Nichts bleibt für dich
Für immer
Pirate Elf
 
Posts: 732
Joined: Wed Jan 31, 2007 9:45 pm

Postby msbzdragn » Thu May 08, 2003 6:16 am

Thanks, I've added this to the Q&A section...
Michael R. Tomkins
Administrator, 'Unofficial Coranto / NewsPro Forums'

Mitsubishi Diamante Forum

Do NOT send me instant messages asking for Coranto help without me telling you explicitly to do so. You WILL be placed on ignore if you do so; I don't have time to provide personal tech support to every person who IM's me. Sorry!
User avatar
msbzdragn
 
Posts: 2397
Joined: Mon Mar 11, 2002 4:51 pm
Location: Oak Ridge, TN

Postby gamin » Sat Jul 03, 2004 3:48 pm

I followed your instructions but all I get is that little blank image icon thing. You know the image that appears when an image url is wrong? Well , yeah. I viewed the source and it seems that it doesn't even place an url in the image tag, it just leaves it blank. What's wrong?
gamin
 
Posts: 5
Joined: Wed Jun 30, 2004 2:55 pm

Postby Parahead » Sun Jul 04, 2004 3:53 pm

gamin wrote:I followed your instructions but all I get is that little blank image icon thing. You know the image that appears when an image url is wrong? Well , yeah. I viewed the source and it seems that it doesn't even place an url in the image tag, it just leaves it blank. What's wrong?
An empty field would generate this kind of behaviour. Have you done this part:
First Create a new USER field called MyAvatar. Then go to your User Preferences and put in the http:// path to the icon you wish to use.

To verify if the field is emtpy you should use this code:
Code: Select all
<If: Field: UserField_MyAvatar>
  <img src="<Field: UserField_MyAvatar>" border="0">
<If: Else>
  No Avatar Selected
</If>
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby gamin » Sun Jul 04, 2004 4:11 pm

No I wasn't getting the no avatar text from the if code but that blank image icon thing that comes up when an image is not found. But when I view the source there is no url in the img tag. And I was doing the option where you select which avatar to use from a menu in the submit news page. That means that the avatar url is not being pasted in the code. Would you know how to fix this?
gamin
 
Posts: 5
Joined: Wed Jun 30, 2004 2:55 pm

Postby Parahead » Sun Jul 04, 2004 4:36 pm

gamin wrote:And I was doing the option where you select which avatar to use from a menu in the submit news page. That means that the avatar url is not being pasted in the code. Would you know how to fix this?
What is the name of your Avatar Custom Field and what does your style looks like...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby gamin » Sun Jul 04, 2004 7:37 pm

I know that the fields are working because it's the only way my style could inport the field with the image. The thing is that the field inserts a blank img tag. I've tested out so many things but it still doesn't work. I'm gonna try doing one thing though by changing my avatar tag so that it isn't an if command.
gamin
 
Posts: 5
Joined: Wed Jun 30, 2004 2:55 pm

Postby Parahead » Sun Jul 04, 2004 9:26 pm

gamin wrote:I know that the fields are working because it's the only way my style could inport the field with the image. The thing is that the field inserts a blank img tag.
Well, obviously something isn´t working, correct? And in order for me to help you I need the information I asked for...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby gamin » Sat Jul 24, 2004 1:41 pm

Yeah I had an error with my style but fixed it but now whenever I post I have another error. The coding get's all weird and when I view news.txt it looks as if a cross between an img and link tag. Here's my style:

<table border="1" width="100%" id="table1" bordercolorlight="#000000" bordercolordark="#000000" cellspacing="1" height="190">
<tr>
<td colspan="2" bgcolor="#425684" background="http://campg.illusionfxnet.com/news/new_templ/subjectbg.gif" height="25" valign="top"><u><font size="4"><b><i>Subject: </i>
</b></font></u>&nbsp;&nbsp;&nbsp; <Field: Subject></td>
</tr>
<tr>
<td bgcolor="#425684" width="22%" valign="top">Posted by:<br>
<If: Field: CustomField_avatars>
<img src="<Field: CustomField_avatars>" border="0">
<If: Else>
no avatar
</If>
<br><Field: User><p>
on: <Field: Date></td>
<td width="75%" background="http://campg.illusionfxnet.com/news/new_templ/content_bg.gif" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0" id="table2">
<tr>
<td><Field: Text></td>
</tr>
</table>
</td>
</tr>
</table>
<br>


Also I am using the WYSIWYG Editor to code so that might have someyhing to do with this. Sorry for not replying in such a long time. Well, I hope you can help.
Thanks,
gamin
gamin
 
Posts: 5
Joined: Wed Jun 30, 2004 2:55 pm


Return to Troubleshooting

Who is online

Users browsing this forum: No registered users and 1 guest

cron