Scoop -- the swiss army chainsaw of content management
Front Page Everything News Code Help! Wishlist Project Scoop Sites Dev Notes Latest CVS changes Development Activities
Scoop Box Exchange - Show Box: set_avatar 1.00

Author: on2raj [Info]

Description:

Deployed as it's own op, takes a cgi argument and sets it as the user's avatar URL for display with "show_avatar"

Box Code:

## START set_avatar ##
# set_avatar scoop box by Jason Eaton
# http://www.on2raj.org
# This box sets an avatar to display next to the
# user's posts and stories.
# The other side of it is show_avatar and
# choose_avatar
# In order to use this box, you must addd a
# table to your SQL
# database named "avatar"
# with the following SQL command:
#
# CREATE TABLE avatar (
# avatar varchar(255),
# user varchar(255),
# uid int(10) DEFAULT 0,
# INDEX (uid)
# );
# Deploy the box as it's own op on a template with
# a navigation menu, and give it /avatar/ as a URL
# template.
#
# Structure stolen nearly completely from janra's
# "referer_catch" box. Thanks for that.

my $raw_user = $S->{NICK};
my $uid = $S->{UID};
my $raw_avatar = $S->cgi->param('avatar');
my $user = $S->{DBH}->quote($raw_user);
my $avatar = $S->{DBH}->quote($raw_avatar);


# check if that URL is already in the db
my ($rv, $sth) = $S->db_select({
WHAT => 'count(uid) AS num',
FROM => 'avatar',
WHERE => "uid = $uid"
});
my $dbresponse = $sth->fetchrow_hashref();
my $uid_exists = $dbresponse->{num};

# count the URL
if ( $uid_exists ) {
($rv, $sth) = $S->db_update({
WHAT => 'avatar',
SET => "avatar = $avatar",
WHERE => "uid = $uid"
});
} else {
$S->db_insert({ INTO => 'avatar',
COLS => 'uid, user, avatar',
VALUES => "$uid, $user, $avatar"
});
}

my $content = qq{ <table><tr><th>Setting Avatar</th>
</tr><tr><td>Sucessfully set avatar $avatar for user $user, uid $uid<br>|BOX,show_avatar,$user|</td></tr></table>};
return $content;

## END set_avatar ##
Display: Sort:
asd (none / 0) (#1)
by julianamartin on Wed Sep 27, 2017 at 09:04:02 AM PST

Hello! This post couldn't be written any better! Reading this post reminds me of my previous room mate! He always kept chatting about this. I will forward this page to him. Fairly certain he will have a good read. Thank you for sharing



sad (none / 0) (#2)
by alastairalbern on Sat Oct 21, 2017 at 08:58:22 AM PST

Superbly written article, if only all bloggers offered the same content as you, the internet would be a far better place.. high blog comments



watchfree (none / 0) (#3)
by julianamartin on Thu Nov 09, 2017 at 01:33:56 AM PST

Hello! This post couldn't be written any better! Reading this post reminds me of my previous room mate! He always kept chatting about this. I will forward this page to him. Fairly certain he will have a good read. Thank you for sharing watchfree



Jual Laptop Notebook PC HP Lenovo Printer Tinta To (none / 0) (#4)
by julianamartin on Thu Nov 16, 2017 at 04:07:37 AM PST

I've just decided to create a blog, which I have been wanting to do for a while. Thanks for this post, it's really useful! Jual PC HP



Furniture Store in Atlanta (none / 0) (#5)
by julianamartin on Mon Nov 20, 2017 at 07:48:10 AM PST

Americana Furniture is a furniture store in Atlanta offering a unique lineup of home furniture including living room furniture, dining room furniture, bedroom furniture, home accessories and more. If you are looking for the best furniture store in Atlanta then come check out Americana Furniture today. Furniture Store in Atlanta



i league live (none / 0) (#6)
by julianamartin on Wed Nov 22, 2017 at 01:34:29 AM PST

This is highly informatics, crisp and clear. I think that everything has been described in systematic manner so that reader could get maximum information and learn many things. i league live



Re: NEW SELECTION COMMITTEE ANNOUNCED (none / 0) (#7)
by alastairalbern on Tue Nov 28, 2017 at 05:12:49 AM PST

You've got some interesting points in this article. I would have never considered any of these if I didn't come across this. Thanks!. Diet Pills UK



asd (none / 0) (#8)
by alastairalbern on Thu Dec 07, 2017 at 05:21:26 AM PST

I was reading your article and wondered if you had considered creating an ebook on this subject. Your writing would sell it fast. You have a lot of writing talent. brian holm lawyer san diego



asd (none / 0) (#9)
by alastairalbern on Tue Jan 23, 2018 at 01:08:32 AM PST

I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. What is a devotional



asd (none / 0) (#10)
by alastairalbern on Wed Jan 24, 2018 at 02:42:31 AM PST

This blog is really great. The information here will surely be of some help to me. Thanks!. WOWYAR



asd (none / 0) (#11)
by alastairalbern on Sat Jan 27, 2018 at 01:09:05 PM PST

I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn't stop reading. I am impressed with your work and skill. Thank you so much. Gentlemens Club Colorado



asd (none / 0) (#12)
by alastairalbern on Sun Jan 28, 2018 at 01:19:38 AM PST

New web site is looking good. Thanks for the great effort. gclub ผ่านเว็บ



s (none / 0) (#13)
by alastairalbern on Sun Jan 28, 2018 at 05:24:06 AM PST

Very useful info. Hope to see more posts soon!. gclub ผ่านเว็บ



sad (none / 0) (#14)
by alastairalbern on Mon Jan 29, 2018 at 12:05:58 PM PST

Friend, this web site might be fabolous, i just like it. 토토솔루션



Seo work (none / 0) (#15)
by alastairalbern on Tue Jan 30, 2018 at 12:26:14 PM PST

Pretty nice post. I just stumbled upon your weblog and wanted to say that I have really enjoyed browsing your blog posts. After all I'll be subscribing to your feed and I hope you write again soon! iPhone repair Colorado Springs



useful information (none / 0) (#16)
by prosperty on Thu Feb 08, 2018 at 01:45:24 AM PST

Excellent beat ! I would like to apprentice while you amend your website, how can i subscribe for a blog website? The account helped me a acceptable deal. I had been a little bit acquainted of this your broadcast provided bright clear concept Real Estate Company in Chennai



sad (none / 0) (#17)
by alastairalbern on Sun Feb 11, 2018 at 06:08:04 AM PST

Admiring the time and effort you put into your blog and detailed information you offer!.. what must i do to be saved



asdsad (none / 0) (#18)
by alastairalbern on Wed Feb 21, 2018 at 03:46:45 AM PST

Positive site, where did u come up with the information on this posting? I'm pleased I discovered it though, ill be checking back soon to find out what additional posts you include. hometowngardener.com



chrisgale016 (none / 0) (#19)
by elizabethsachez9 on Fri Oct 12, 2018 at 08:00:11 AM PST

I must say, I thought this was a pretty interesting read when it comes to this topic. Liked the material. . . http://www.beanyblogger.com/josephbryant/2018/10/03/13/



Coreanderson23 (none / 0) (#20)
by coreanderson23 on Wed Oct 31, 2018 at 09:38:06 AM PST

Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. https://www.sayweee.com/article/view/4gu0e?t=1540260763169



Coreanderson23 (none / 0) (#21)
by coreanderson23 on Thu Nov 01, 2018 at 01:20:10 AM PST

Hey - great blog, just looking around some blogs, seems a really nice platform you are using. I'm currently using WordPress for a few of my blogs but looking to change one of them over to a platform similar to yours as a trial run. Anything in particular you would recommend about it? http://www.fxstat.com/en/user/profile/stanleygreene-79999/blog/29388442-James-Riggs



Coreanderson23 (none / 0) (#22)
by coreanderson23 on Thu Nov 01, 2018 at 08:14:01 AM PST

You have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site. XXR wheels



Coreanderson23 (none / 0) (#23)
by coreanderson23 on Tue Nov 06, 2018 at 12:45:08 AM PST

My friend mentioned to me your blog, so I thought I'd read it for myself. Very interesting insights, will be back for more! 借錢



elizabethsachez9 (none / 0) (#24)
by elizabethsachez9 on Mon Nov 12, 2018 at 03:20:26 AM PST

My friend mentioned to me your blog, so I thought I'd read it for myself. Very interesting insights, will be back for more! http://www.imfaceplate.com/francisentwistle/need-more-time-read-these-tips-to-eliminate-black-friady -mattress



dollb3229 (none / 0) (#25)
by johncarter2038 on Mon Nov 12, 2018 at 04:38:03 AM PST

I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post. http://www.pearltrees.com/francisentwistle/item239175849



Coreanderson23 (none / 0) (#26)
by coreanderson23 on Tue Nov 13, 2018 at 05:29:00 AM PST

Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates. Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates. poker online indonesia terbaik



elizabethsachez9 (none / 0) (#27)
by elizabethsachez9 on Thu Nov 15, 2018 at 01:41:52 AM PST

Hi there, I found your blog via Google while searching for such kinda informative post and your post looks very interesting for me. 借款



elizabethsachez9 (none / 0) (#28)
by elizabethsachez9 on Thu Nov 15, 2018 at 01:41:59 AM PST

Hi there, I found your blog via Google while searching for such kinda informative post and your post looks very interesting for me. 借款



dollb3229 (none / 0) (#29)
by johncarter2038 on Thu Nov 15, 2018 at 01:57:00 AM PST

Should there be another persuasive post you can share next time, I'll be surely waiting for it. https://medium.com/@dollb3229/http-chimenephew02-cosolig-org-post-how-to-choose-the-bed-for-facet-sl eepers-f895f149871a



elizabethsachez9 (none / 0) (#30)
by elizabethsachez9 on Sat Nov 17, 2018 at 05:01:24 AM PST

You have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site. 借錢



Coreanderson23 (none / 0) (#31)
by coreanderson23 on Thu Nov 22, 2018 at 05:25:51 AM PST

I love the blog. Great post. It is very true, people must learn how to learn before they can learn. lol i know it sounds funny but its very true. . . 快借網



dollb3229 (none / 0) (#32)
by johncarter2038 on Fri Nov 23, 2018 at 01:10:53 AM PST

Great post full of useful tips! My site is fairly new and I am also having a hard time getting my readers to leave comments. Analytics shows they are coming to the site but I have a feeling "nobody wants to be first". Psychic Mediumship Courses



dollb3229 (none / 0) (#33)
by johncarter2038 on Sat Nov 24, 2018 at 12:53:07 AM PST

Should there be another persuasive post you can share next time, I'll be surely waiting for it. 快速借款



dollb3229 (none / 0) (#34)
by johncarter2038 on Mon Nov 26, 2018 at 04:44:15 AM PST

Hi there, I found your blog via Google while searching for such kinda informative post and your post looks very interesting for me. https://www.openlearning.com/u/stanleygreene/blog/JohnBlanchard0



elizabethsachez9 (none / 0) (#35)
by elizabethsachez9 on Tue Nov 27, 2018 at 05:32:51 AM PST

I definitely enjoying every little bit of it. It is a great website and nice share. I want to thank you. Good job! You guys do a great blog, and have some great contents. Keep up the good work. hiddeninthehollowfestival



elizabethsachez9 (none / 0) (#36)
by elizabethsachez9 on Wed Nov 28, 2018 at 01:56:33 AM PST

What a good blog you have here. Please update it more often. This topics is my interest. Thank you. . . http://www.keralatoursandholidays.com/



Coreanderson23 (none / 0) (#37)
by coreanderson23 on Thu Nov 29, 2018 at 04:24:34 AM PST

You have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site. https://www.openlearning.com/u/stanleygreene/blog/ErnestoWilliams



dollb3229 (none / 0) (#38)
by johncarter2038 on Sat Dec 01, 2018 at 05:08:31 AM PST

You have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site.https://www.kiwibox.com/kennethyoung/blog/entry/146588007/secrets-to-getting-best-mattress-to-comple te-tasks-quickl/?pPage=0



Coreanderson23 (none / 0) (#39)
by coreanderson23 on Tue Dec 04, 2018 at 08:12:11 AM PST

I definitely enjoying every little bit of it. It is a great website and nice share. I want to thank you. Good job! You guys do a great blog, and have some great contents. Keep up the good work. best hair loss shampoo



ati (none / 0) (#40)
by jackiedavis351 on Thu Dec 06, 2018 at 04:35:55 AM PST

Hey, great blog, but I don't understand how to add your site in my rss reader. Can you Help me please? https://uberant.com/article/445203-strategies-for-cleaning-crib-mattresses/



dollb3229 (none / 0) (#41)
by johncarter2038 on Thu Dec 06, 2018 at 04:51:00 AM PST

I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post. weekend payday loans no credit check australia



dollb3229 (none / 0) (#42)
by johncarter2038 on Sat Dec 08, 2018 at 05:50:15 AM PST

I must say, I thought this was a pretty interesting read when it comes to this topic. Liked the material. . . . . Simple Burger Recipe



ati (none / 0) (#43)
by jackiedavis351 on Fri Dec 14, 2018 at 07:58:47 AM PST

My friend mentioned to me your blog, so I thought I'd read it for myself. Very interesting insights, will be back for more! https://telegra.ph/BEST-MATTRESS-Its-Easy-If-You-Do-It-Smart-12-17



Coreanderson23 (none / 0) (#44)
by coreanderson23 on Mon Dec 17, 2018 at 06:51:12 AM PST

Great post! I am actually getting ready to across this information, is very helpful my friend. Also great blog here with all of the valuable information you have. Keep up the good work you are doing here. https://medium.com/@kopubajahi/http-www-k965-net-blog-view-17547-very-best-mattress-know-your-mattre ss-sorthttps-wallinside-com-ec9fc5f83943



ati (none / 0) (#45)
by jackiedavis351 on Tue Dec 18, 2018 at 03:11:59 AM PST

You have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site. https://www.evernote.com/shard/s510/sh/ec2a0d86-cda1-4eb6-86ec-ffd022cfbfbf/7982f12505e17



Coreanderson23 (none / 0) (#46)
by coreanderson23 on Thu Dec 20, 2018 at 06:46:52 AM PST

Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. ole777 blog



ati (none / 0) (#47)
by jackiedavis351 on Thu Dec 27, 2018 at 02:53:27 AM PST

Should there be another persuasive post you can share next time, I'll be surely waiting for it. https://www.change.org/p/kennethyoung-you-can-thank-us-later-3-reasons-to-stop-thinking-about-best-m attress



Coreanderson23 (none / 0) (#48)
by coreanderson23 on Mon Dec 31, 2018 at 06:09:24 AM PST

I have bookmarked your blog, the articles are way better than other similar blogs.. thanks for a great blog! วิธีเล่นบาคาร่&# 3634; fifa55



coreanderson23 (none / 0) (#49)
by coreanderson23 on Tue Jan 01, 2019 at 10:30:33 PM PST

I love the blog. Great post. It is very true, people must learn how to learn before they can learn. lol i know it sounds funny but its very true. . . Phoenix Electrician



ati (none / 0) (#50)
by jackiedavis351 on Thu Jan 10, 2019 at 02:47:09 AM PST

I am always searching online for articles that can help me. There is obviously a lot to know about this. I think you made some good points in Features also. Keep working, great job! grease trap cleaning little Elm



ati (none / 0) (#51)
by jamshedj453 on Sat Jan 12, 2019 at 08:22:37 AM PST

My friend mentioned to me your blog, so I thought I'd read it for myself. Very interesting insights, will be back for more! 借貸



ati (none / 0) (#52)
by jamshedj453 on Mon Jan 14, 2019 at 07:35:50 AM PST

Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It's always nice when you can not only be informed, but also entertained! https://indosakong.com



ati (none / 0) (#53)
by jamshedj453 on Sat Jan 19, 2019 at 02:33:05 AM PST

Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates. Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates. 股票教學



ati (none / 0) (#54)
by jamshedj453 on Sat Jan 19, 2019 at 02:33:15 AM PST

Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates. Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates. 股票教學



ati (none / 0) (#55)
by jamshedj453 on Mon Jan 21, 2019 at 07:55:10 AM PST

Hey, great blog, but I don't understand how to add your site in my rss reader. Can you Help me please? https://telegra.ph/100-Lessons-Learned-From-the-Pros-On-BEST-WORDPRESS-SECURITY-PLUGIN-2018-01-38



ati (none / 0) (#56)
by jamshedj453 on Fri Feb 01, 2019 at 05:39:00 AM PST

I feel a lot more people need to read this, very good info! . . . . . . https://www.playbuzz.com/item/eee6906f-360c-4d54-a350-f133b4e37a28



ati (none / 0) (#57)
by podelag on Thu Feb 21, 2019 at 08:04:16 AM PST

You have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site. 借貸



ati (none / 0) (#58)
by podelag on Thu Apr 11, 2019 at 06:19:11 AM PST

Thanks for writing such a good article, I stumbled onto your blog and read a few post. I like your style of writing... https://www.evernote.com/shard/s333/sh/60be1ea6-a6dd-4abc-91c2-20dcee0c0022/10c4f8b582c116d86d65d1d3 07ae6315



Re: Generous donation of a new house for war hero (none / 0) (#59)
by rosstaylor505 on Mon Aug 05, 2019 at 07:28:17 AM PST

Hi there, I found your blog via Google while searching for such kinda informative post and your post looks very interesting for me. https://www.datafilehost.com/d/3763ead5 http://b3.zcubes.com/v.aspx?mid=1145924 http://judgehour4.iktogo.com/post/the-excellent-mattress-to-acquire-nowadays



Manchas na pele (none / 0) (#60)
by rosstaylor505 on Wed Nov 06, 2019 at 02:12:21 AM PST

Hey, great blog, but I don't understand how to add your site in my reader. Can you Help me please? Manchas na pele



Menu
create account
faq
search
report bugs
Scoop Administrators Guide
Scoop Box Exchange

Scoop Site Scroller: Get one yourself!
Keepers of Lists
Got Lists? We've got over 1800

Login
Make a new account
Username:
Password:

Hosted by ScoopHost.com Powered by Scoop
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest 1999 The Management

create account | faq | search