How to add an Advert to the Chatwindow?

Hi,

I’m looking for a plugin/solution for having a little advert on the bottom of the chatwindow. Is there any solution available or do I have to modify it myself (and how)?

There is currently no solution for this. this would make a great addition to the community plugins if you would like to create and distribute it.

Hi psypsy,

Just to add slightly to what mtstravel already wrote, adding items to the bottom of the ChatRoom (chatwindow) can be done through a sparkplug and only requires a few lines of code. As an example the following code:

SparkManager.getChatManager().addChatRoomListener(new ChatRoomListenerAdapter() {
   public void chatRoomOpened(final ChatRoom room) {
      room.getBottomPanel().add(new JLabel("Shop @ B and L"), new GridBagConstraints(0, 5, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
   }
});

Was used to produce the attached screen shoot.

Hope that helps,

Ryan

I want to thank you first. Looks really good but couldn’t it be a problem having a removeable plugin? Anyone can remove the Plugin and have an ad-free spark again - or did I get it wrong?

Edit: uh, well, adding it hardcoded could be an anwer, trying to figure it out

Yes, they could delete the plugin if they wanted or had permission to do so. They could also install a different client for that matter.

You could alter the Spark source directly, just be sure to adhere to the GNU Lesser Public License that it is released under.

Cheers,

Ryan