Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Update Change avatar size for admin and user
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Update Change avatar size for admin and user

 Post Reply Post Reply
Author
hohuybinh View Drop Down
Newbie
Newbie


Joined: 22 July 2010
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote hohuybinh Quote  Post ReplyReply Direct Link To This Post Topic: Update Change avatar size for admin and user
    Posted: 22 July 2010 at 5:38am
i'm form vietnam, i'm not a fluent english speaker but i'm hope every one can do it with short directions.

1-in forum_post.asp

a/ create 1 variable to contain authorid
Dim strAuthorID


b/ find sql select command line to edit and add unndeline element
'SQL SELECT
strSQL = strSQL & strDbTable & "Thread.Thread_ID, " & strDbTable & "Thread.Message, " & strDbTable & "Thread.Message_date, " & strDbTable & "Thread.Show_signature, " & strDbTable & "Thread.IP_addr, " & strDbTable & "Thread.Hide, " & strDbTable & "Author.Author_ID, " & strDbTable & "Author.Username, " & strDbTable & "Author.Homepage, " & strDbTable & "Author.Location, " & strDbTable & "Author.No_of_posts, " & strDbTable & "Author.Join_date, " & strDbTable & "Author.Signature, " & strDbTable & "Author.Active, " & strDbTable & "Author.Avatar, " & strDbTable & "Author.Avatar_title, " & strDbTable & "Group.Name AS GroupName, " & strDbTable & "Group.Stars, " & strDbTable & "Group.Custom_stars, " & strDbTable & "GuestName.Name AS GuestName, "& strDbTable & "Author.Group_ID "


c/ Find command line
strAuthorSignature = sarryPosts(12,intCurrentRecord)
add following code after that
'authorID for poster
strAuthorID= sarryPosts(20,intCurrentRecord)


d/ find the command line
'If the user has an avatar then display it

and replace all if after that by following code
If blnAvatar = True AND strAuthorAvatar <> "" and strAuthorID="1" Then Response.Write("<img src=""" & strAuthorAvatar & """ alt=""" & strTxtAvatar & """ class=""avatar"" onerror=""this.src='avatars/blank_avatar.jpg';"" id=""adavatar""") else Response.Write("<img src=""" & strAuthorAvatar & """ alt=""" & strTxtAvatar & """ class=""avatar"" onerror=""this.src='avatars/blank_avatar.jpg';"" id=""avatar""") end if If 


2/ in css_styles  folder open all default.css at all skin and add following code

.avatar,#adavatar
{
    width: 140px;
    height: 140px;
    border: 1px solid #000000;
    margin: 2px;   
}


i'm hope it is useful for you




Edited by hohuybinh - 25 July 2010 at 1:20am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.