For all things Webs!

Welcome to Haroon's Website

Blog

Update your status from the sidebar! Version 1

xiofire: So you think you can type? http://cloudica.net/typeracer Posted by xiofire at 11:45 AM on September 06, 2009

Hey webs,

I decided to write up a little tutorial as per request. I have a status update form on my sites sidebar.

Heres a step by step tutorial on how to do it.


First, open your Site Editor (or whatever webs is calling it) and choose "Sidebar"


Click "Custom Module", then choose the custom HTML button.



Now, simply paste the following code.

BE SURE TO CHANGE "YOURSITE.webs.com" TO THE URL OF YOUR WEBS SITE.


http://pastie.org/607743


Now, hit "Save" and go to your site, find the sidebar, and Ta-da! You should see:



Now, for this, guest CAN see it, but it simply doesn't do anything, justs reloads the current page. No errors.


In the next version tutorial, I will try to send the data via an Ajax request so the user is not redirected to their profile. For now, enjoy! smile


 


Categories: How To's, Community Posts

Post a Comment

You must be a member to comment on this page. Sign In or Register

33 Comments

Haroon: Happy Holidays Everyone
reply Haroon
06:04 PM on September 08, 2009
Cool. You should also post a video tutorial of this to webshowto.webs.com
Snedeker Designz
reply Snedeker Designz
06:56 PM on September 08, 2009
Awesomeness xio! And yeah, you should make this into a video tut!!
[Adam Miner]: http://haroon.webs.com/apps/forums/topics/show/1718620-blog-rss-missing-somehting
reply [Adam Miner]
07:45 PM on September 08, 2009
I can haz it for CustomizeWebs?
Snedeker Designz
reply Snedeker Designz
07:46 PM on September 08, 2009
Adam: the logical answer would be yes, this is afterall a tutorial.
xiofire: So you think you can type? http://cloudica.net/typeracer
reply xiofire
07:47 PM on September 08, 2009
[Adam Miner says...
]
I can haz it for CustomizeWebs?
]
No, you can't copy it if thats what you were thinking. :P
[Adam Miner]: http://haroon.webs.com/apps/forums/topics/show/1718620-blog-rss-missing-somehting
reply [Adam Miner]
07:50 PM on September 08, 2009
xiofire says...
]
No, you can't copy it if thats what you were thinking. :P

I can haz the pastie?
Snedeker Designz
reply Snedeker Designz
07:51 PM on September 08, 2009
Lol
xiofire: So you think you can type? http://cloudica.net/typeracer
reply xiofire
07:51 PM on September 08, 2009
[Adam Miner says...
]

I can haz the pastie?
]
Yes. But copy this tutorial and die!
Snedeker Designz
reply Snedeker Designz
07:52 PM on September 08, 2009
Adam apparently didn't read the tutorial. *rolls eyes*
xiofire: So you think you can type? http://cloudica.net/typeracer
reply xiofire
07:53 PM on September 08, 2009
Snedeker Designz says...
Adam apparently didn't read the tutorial. *rolls eyes*

I think he should make his own. 9_9
Snedeker Designz
reply Snedeker Designz
07:54 PM on September 08, 2009
that would be copying the tutorial xD
[Adam Miner]: http://haroon.webs.com/apps/forums/topics/show/1718620-blog-rss-missing-somehting
reply [Adam Miner]
08:00 PM on September 08, 2009
Code simplified:
http://adamminer.co.cc/beta/subdir/status.php
xiofire: So you think you can type? http://cloudica.net/typeracer
reply xiofire
08:02 PM on September 08, 2009
Thanks, but its not as hands on, and depletes the purpose of the tutorial.
xiofire: So you think you can type? http://cloudica.net/typeracer
reply xiofire
08:03 PM on September 08, 2009
Snedeker Designz says...
Awesomeness xio! And yeah, you should make this into a video tut!!

Thanks. I'll post a video when I get this to submit via ajax. Somehow -_-
Vash
reply Vash
11:13 PM on September 08, 2009
is there a way yet to have forum ranks based on how many posts a member has? I know java and i could input the code if it was java but i dont know where. Let me know about the forum ranks. thanks
Ryan
reply Ryan
01:17 AM on September 09, 2009
Hey, this is a pretty cool little trick you've done here.

That said, I noticed you wanna do it through AJAX... I foresee some issues there, because unless you wanna roll your own AJAX functions, you're gonna need to be able to include a library, pushing up the total download of users page, or possibly break compatibility if you have them include something like jQuery when they've already got Prototype.

That said, this problem has been around since the dawn of time, and there are some interesting solutions. I threw together a POC wherein it uses a hidden iframe to submit the status update with Javascript:

http://gist.github.com/183483

The code is in no way perfect - that's a 15 minute 1AM sprint, so bear with me. ;)

That said, it works in Gecko/Webkit/etc. It *should* work in Trident (IE), but I wouldn't be surprised if IE throws some odd issue with it. I made an effort to document it well, but lemme know if there's anything you don't get. There's a few interesting tricks in there, too, the most interesting probably being where we do a check to see if there's a currently logged-in user. Feel free to steal snippets for your own stuff, guys. big grin

I'll end on one final note - though I work for Webs, this code in no way represents Webs. It's not endorsed by Webs in any manner; this is me to you, just throwing out some ideas to help further your goals. If it breaks, cry to me, not Webs. ;)
xiofire: So you think you can type? http://cloudica.net/typeracer
reply xiofire
07:12 AM on September 09, 2009
I was hoping I could somehow submit the data in the background in a post method. I was able to with a chatbox I made a while ago, but with a get method, and PHP.
Ryan
reply Ryan
11:18 AM on September 09, 2009
xiofire says...
I was hoping I could somehow submit the data in the background in a post method. I was able to with a chatbox I made a while ago, but with a get method, and PHP.


Yeah, sadly, I think the closest you'll get with just JS (in this case, without relying on a library) is something tricky like the hidden iframe scenario. The response that's sent back by the page is a little odd, as it's a JS redirect, so you can't do the old "append a new script tag" trick either. :\
xiofire: So you think you can type? http://cloudica.net/typeracer
reply xiofire
02:53 PM on September 09, 2009
Ryan says...
Yeah, sadly, I think the closest you'll get with just JS (in this case, without relying on a library) is something tricky like the hidden iframe scenario. The response that's sent back by the page is a little odd, as it's a JS redirect, so you can't do the old "append a new script tag" trick either. :\

Do you think, by studying the Wiki documentation, I would be able to make some sort of widget?
Ryan
reply Ryan
04:28 PM on September 09, 2009
xiofire says...
Do you think, by studying the Wiki documentation, I would be able to make some sort of widget?


Anything is possible, yeah, but there's really nothing on the Wiki that you'd need for this (at least, nothing to get it working). If you need/want any help/advice, though, you're welcome to contact me at any time.

Members Area

Newest Members

josephgardenMarsh Kimmie 

Recent Videos

Upcoming Events

Friday, Dec 18, All day
Tuesday, Jan 5, All day
Tuesday, Jan 26 at 9:00 am
Wednesday, Feb 10, All day

Recent Photos

 

Testimonials

  • "Brilliant site maker. I have tried others in the past , but just after 5 mins nothing compares to Webs.com and its all FREE! apart from when you want a .com or co.uk ext."
    Alex
    Client
  • "Webs/Freewebs has always been an amazing web host. They offer a ton of advanced apps for your business or social network site, that require absolutely no HTML to use! Webs is..."
    iymovies
    Satisfied customer since 2005