continienzo
2008-04-16T23:32:33Z
Hi, We developed a shoutbox/tagboard for yaf forum, It has yet some TODO and maybe only a major bug to fix.
We would like to share with you all, and we will be happy if it will be put in 1.9.3 YAF version repository.

It is been put into a user control that I will attach.
Also I will attach the query for the table and the 2 store procedures. They are not else in the install procedure.

Then you need to do the following changes to the code:


In controls ->>> ForumActiveDiscussion.ascx

<asp:UpdatePanel ID="UpdateStatsPanel" runat="server" UpdateMode="Conditional">

In controls ->>> ForumStatistics.ascx

<asp:UpdatePanel ID="UpdateStatsPanel" runat="server" UpdateMode="Conditional">

In YAF.Classes.Data ->>> DB.cs add the following code

#region yaf_shoutbox



static public bool shoutbox_message_save(object message, object userName, object ip)
{
using (SqlCommand cmd = DBAccess.GetCommand("shoutbox_message_save"))
{
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("Message", message);
cmd.Parameters.AddWithValue("UserName", userName);
cmd.Parameters.AddWithValue("IP", ip);
DBAccess.ExecuteNonQuery(cmd);
return true;
}
}

static public DataTable shoutbox_message_read()
{
using (SqlCommand cmd = DBAccess.GetCommand("shoutbox_message_read"))
{
cmd.CommandType = CommandType.StoredProcedure;
return DBAccess.GetData(cmd);
}
}

#endregion



In YAF.Classes.Utils ->>> Constants.cs add the following const to the list of others.

public const string ShoutBox = "ShoutBox";

In images folder you have to put the gif in the attachement.



That should be all, but if there are any problem and if I miss something I'm here :)


TODO:
Name of the user bold with profile link.
Now guest for my choise can't write in the shoutbox, but maybe it could be an admin options in the host setting if you would or not make them to write.
Don't know.. tell me you...

BUGS:
The only annoying bug that I found and I'm trying to fix is that if you go in a forum and then back to the home page it show you only 9 rows in the shoutbox, then if you click the image button to refresh, it refresh and you will se the last 30 rows (I made it do read only the last 30 messages.)
Don't know if there are others bugs...

EDIT1:
The bug above seems to be only with IE... It works fine with firefox!!! :shock: :oops: :cry:

That's all folks
Hope you like it

:cheesy: :cheesy:

EDIT2: Sorry i forgot to say that you have to add in Pages ->>> Forum.ascx the following code to register and show the usercontrol:

<%@ Register TagPrefix="YAF" TagName="TagBoard" Src="../controls/TagBoard.ascx" %>


<YAF:TagBoard ID="TagBoard" runat="server" OnNeedDataBind="OnNeedDataBind"/>
File Attachment(s):
TagBoard.rar (4kb) downloaded 168 time(s).
Sponsor
test2005
2008-04-17T00:56:43Z

Outstanding contribution! Thanks 😛 😛 😛 😛 😛


.....the man in black fled across the desert..........and the gunslinger followed.....
continienzo
2008-05-27T03:44:14Z
Did anyone implement in the forum the tagbord and get it fully work?
Let me know please....
Kinds regards
E.C.
Ederon
2008-05-27T07:21:38Z
hey Enzo, can we see it implemented somewhere on the web? I can't play with it atm but I'm curious to see.
When I post FP:Ederon in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting.
UserPostedImage 
continienzo
2008-06-05T21:25:42Z
We have a new version of the tagBoard that use ajax to refresh itself.

I put in the zip also a screenshot of it lookslike and some other files to create the proper table and stored procedures.

I think it is a nice feature that can be useful for leaving short messages and chatting with people on-line. Yetanotherforum should include it!!!

Have a nice day
Enzo & C.

File Attachment(s):
TagBoardAjax.rar (30kb) downloaded 165 time(s).
EP
  •  EP
  • 63.8% (Friendly)
  • YAF Camper
2008-06-20T05:10:52Z
hi, this all looked very interesting, so I tried to implement it and ran into a ton of issues.

1st, I just downloaded and installed YAF yesterday, but it looks like your code was meant for an older version of YAF??? The namespaces are different.

The "usings" in shoutbox_message_save and shoutbox_message_read had to be rewritten.

Also....UserLink? is this a 3rd party utility? Your code references YAF.UserLink but it is nowhere to be found in the YAF solution?

I worked my way though most of the issues, but I stopped at UserLink because I wasn't sure if that was the end of it or not. I also tried to find a working example, like where the screenshot came from, but no luck. oh and was there supposed to be an image included in the rar file?

Sounds like this will be pretty cool, once all those items are worked out. 🙂
sinbad911
2008-06-29T00:06:25Z
i have installed Tagboard for YAF, it's cool. I modified this code can use bbcode, you can see it here
http://diendan.congnghiep4.com/ 
Diễn đàn đại học Công Nghiệp TPHCM: http://congnghiep4.com 
continienzo
2008-06-30T03:12:55Z
sinbad911 wrote:

i have installed Tagboard for YAF, it's cool. I modified this code can use bbcode, you can see it here
http://diendan.congnghiep4.com/ 



Hi sinbad911, can you share your modified code for the tagboard that adds bbcode?

@ EP, it just works fine, for the 1.9.3, with no need to add anything more to the code. I'm trying to get it online as soon as possible and show it.
sinbad911
2008-06-30T16:08:17Z
continienzo wrote:

sinbad911 wrote:

i have installed Tagboard for YAF, it's cool. I modified this code can use bbcode, you can see it here
http://diendan.congnghiep4.com/ 



Hi sinbad911, can you share your modified code for the tagboard that adds bbcode?

@ EP, it just works fine, for the 1.9.3, with no need to add anything more to the code. I'm trying to get it online as soon as possible and show it.



change this line:
Quote:

labelUser.Controls.Add(ul);
labelMessage.Text =YAF.Classes.UI.BBCode.ConvertBBCodeToHtmlForEdit( currentRow["Message"].ToString());


Diễn đàn đại học Công Nghiệp TPHCM: http://congnghiep4.com 
continienzo
2008-07-02T08:58:58Z
sinbad911 wrote:

continienzo wrote:

sinbad911 wrote:

i have installed Tagboard for YAF, it's cool. I modified this code can use bbcode, you can see it here
http://diendan.congnghiep4.com/ 



Hi sinbad911, can you share your modified code for the tagboard that adds bbcode?

@ EP, it just works fine, for the 1.9.3, with no need to add anything more to the code. I'm trying to get it online as soon as possible and show it.



change this line:
Quote:

labelUser.Controls.Add(ul);
labelMessage.Text =YAF.Classes.UI.BBCode.ConvertBBCodeToHtmlForEdit( currentRow["Message"].ToString());




Thanks mate but doing so the most "skilled" user could use in the tagboard all the bbcode (bold,size,color,etc). It would be better to get working only the smiley and either only the selected ones... :?
EP
  •  EP
  • 63.8% (Friendly)
  • YAF Camper
2008-07-03T12:46:20Z
continienzo wrote:


@ EP, it just works fine, for the 1.9.3, with no need to add anything more to the code. I'm trying to get it online as soon as possible and show it.




AHA! perhaps that is the problem. I am running the version you get when clicking "download", which turns out to be 1.9.1

I'll give it another try after I upgrade to the latest beta.
EP
  •  EP
  • 63.8% (Friendly)
  • YAF Camper
2008-07-03T12:48:53Z
sinbad911 wrote:


i have installed Tagboard for YAF, it's cool. I modified this code can use bbcode, you can see it here
http://diendan.congnghiep4.com/ 



I am obviously missing something. When I click on that link I do not see a Tagboard.:?:
sinbad911
2008-07-06T19:24:52Z
Quote:

I am obviously missing something. When I click on that link I do not see a Tagboard


i removed it because of some errors, it'll work when i test no errors
Diễn đàn đại học Công Nghiệp TPHCM: http://congnghiep4.com 
continienzo
2008-07-06T20:58:43Z
sinbad911 wrote:

Quote:

I am obviously missing something. When I click on that link I do not see a Tagboard


i removed it because of some errors, it'll work when i test no errors



Can I ask what errors you encountered please?

Thanks :?
EP
  •  EP
  • 63.8% (Friendly)
  • YAF Camper
2008-07-18T05:31:56Z
Ok, after going to 1.9.3 I was able to add the controls and compile. The installation instructions could use some help, though and if I get some free time (good luck to me!) I could put together the steps I had to take to get it working.

You may want to add the refresh.gif to the download - I just googled one and added it to my images folder. Also the scripts to create the stored procs are prefixed with "inc_" and the code is looking for "yaf_". The location of the constant should be noted - needs to go in the Cache section.

my working sample is here .

Items on my wishlist, that I may or may not get to soon: alternate item style in the repeater, adding smiley support (popup link maybe?), and using whatever method is used to display regular posts - that should take care of smileys, images, links, etc.

Great work, by the way!

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved