Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Shoutbox Mod
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Shoutbox Mod

 Post Reply Post Reply Page  <1 78910>
Author
Gleedo View Drop Down
Groupie
Groupie


Joined: 23 October 2007
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gleedo Quote  Post ReplyReply Direct Link To This Post Posted: 31 October 2007 at 8:12pm
Dont worry.
 
I managed to hack a frigged version of shemzillas into my mySQL version.
 
I also got it adding my shout text from the input box without refreshing the home page Smile
Back to Top
shemzilla View Drop Down
Newbie
Newbie


Joined: 19 June 2007
Location: South Africa
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote shemzilla Quote  Post ReplyReply Direct Link To This Post Posted: 31 October 2007 at 9:04pm
Originally posted by Gleedo Gleedo wrote:

Dont worry.
 
I managed to hack a frigged version of shemzillas into my mySQL version.
 
I also got it adding my shout text from the input box without refreshing the home page Smile


Good to hear ;)
ps: if ya don't mind, do share with us how you add the shout without refreshing?

Shem
Back to Top
Gleedo View Drop Down
Groupie
Groupie


Joined: 23 October 2007
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gleedo Quote  Post ReplyReply Direct Link To This Post Posted: 31 October 2007 at 9:24pm
Hi Shem
 
You can see the "almost" finsihed hack of what i did here:
 
 
You will need to register though Smile
 
You had the form on the main page with an iframe below it that called shoutbox.asp.
 
All i did was move the table/form into shoutbox.asp and still set shoutbox.asp as the source for the iframe in default.asp.
 
Then when submitting the form in shoutbox.asp, i posted back to itself catching the form contents using QueryString and added it to the database.
 
Also in shoutbox.asp is another iframe which loads addshout.asp (now the wrong name for it).  That page just gets all shout messages from the db and displays them.  i put a meta refresh inside addshout.asp to it can refresh while you are typing a new message up in shoutbox.asp.
 
See below Smile.  I did add one of two style changes to the dark default stylesheet because i couldnt figure out which styles i needed lol.  I havent done any web development ages, so i'm a bit rusty.  I would really like to add a smily selector to the shoutbox as well :)
 
I changed the code block in default.asp to be:

<!-- SHOUTBOX -->

<%If lngLoggedInUserID <> 2 Then%>

<table cellspacing="0" cellpadding="0" align="center" width="98%" border="0" height="200px">

<tr bgcolor="black" valign="top">

<td bgcolor="black" height="200px" valign="top"><iFrame ID="IFrame1" src="shoutBox.asp" style="width:100%;" height="100%" scrolling="no" frameborder="0"></iFrame></td>

</tr>

</table>

<%end if%><!-- SHOUTBOX END -->
 
I then modified shoutBox.asp to the following:

[code]

<% @ Language=VBScript %>

<% Option Explicit %>

<!--#include file="common.asp" -->

<!--#include file="functions/functions_date_time_format.asp" -->

<%

Dim strShoutText

Dim sqlAddShout

if Request.QueryString("action") <> "" then

' we need to add to the database

strShoutText = Request.Form("txtShout")

strShoutText = removeHTML(strShoutText,300,True)

sqlAddShout="INSERT INTO tblShouts (Author_Name, Shout_Msg)"

sqlAddShout=sqlAddShout & " VALUES "

sqlAddShout=sqlAddShout & "('" & strLoggedInUsername & "',"

sqlAddShout=sqlAddShout & "'" & strShoutText & "')"

adoCon.Execute sqlAddShout

end if

%>

<html>

<head>

<link href="<% = strCSSfile %>default_style.css" rel="stylesheet" type="text/css" />

</head>

<body bgcolor="#373737">

<script language

Back to Top
Gleedo View Drop Down
Groupie
Groupie


Joined: 23 October 2007
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gleedo Quote  Post ReplyReply Direct Link To This Post Posted: 31 October 2007 at 9:27pm
PS I could not figure out how to get a default date in my database via this web portal thingy i use, so left it out.  also couldnt get the query to lookup the user id,thats why the usernames dont link to the profile page :(
Back to Top
cbr600 View Drop Down
Groupie
Groupie
Avatar

Joined: 05 October 2003
Location: Portugal
Status: Offline
Points: 89
Post Options Post Options   Thanks (0) Thanks(0)   Quote cbr600 Quote  Post ReplyReply Direct Link To This Post Posted: 15 November 2007 at 1:57am

so any news on your work, guys?

is the version available from download on the first page, the final version? and does it work only on refresh, or is it auto-refreshable?


Back to Top
exper View Drop Down
Newbie
Newbie


Joined: 25 August 2007
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote exper Quote  Post ReplyReply Direct Link To This Post Posted: 16 November 2007 at 12:44am
Hata

SQL sorgusu:

CREATE TABLE [dbo].[tblShouts](

[Shout_ID][int]IDENTITY( 1, 1 ) NOT NULL ,
[Author_ID][int] NULL ,
[Shout_Msg][varchar]( 500 ) NULL ,
[Shout_Time][datetime] NULL CONSTRAINT [DF_tblShouts_Shout_Time]DEFAULT(
getdate(
)
)
) ON [ PRIMARY ]GO

MySQL çıktısı: Yardım

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[dbo].[tblShouts](    [Shout_ID] [int] IDENTITY(1,1) NOT NULL,    [Author_ID] [i' at line 1

help please :(
Back to Top
leiti View Drop Down
Groupie
Groupie


Joined: 16 February 2005
Status: Offline
Points: 65
Post Options Post Options   Thanks (0) Thanks(0)   Quote leiti Quote  Post ReplyReply Direct Link To This Post Posted: 22 November 2007 at 1:54pm
Are there any plans to create an shoutbox which refreshes on its own?
 
perhaps with ajax?
Back to Top
Gleedo View Drop Down
Groupie
Groupie


Joined: 23 October 2007
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gleedo Quote  Post ReplyReply Direct Link To This Post Posted: 22 November 2007 at 1:57pm

Just use www.shoutmix.com flash version, integrate very nicely.

See www.Elitesnipercorps.com at bottom of homepage :)
Back to Top
 Post Reply Post Reply Page  <1 78910>

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.