# What does the new mod-stuff

**URL:** <https://www.ruby-forum.com/t/what-does-the-new-mod-stuff/47495>\
**Category:** Ruby-Forum\
**Created:** [August 6, 2005, 5:40pm UTC](https://www.ruby-forum.com/t/what-does-the-new-mod-stuff/47495 "2005-08-06T17:40:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roberto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8baadc/32.png) [@Roberto](https://www.ruby-forum.com/u/Roberto)\
**Post date:** [August 6, 2005, 5:40pm UTC](https://www.ruby-forum.com/t/what-does-the-new-mod-stuff/47495/1 "2005-08-06T17:40:26Z")

</div>

Hi all

I just saw that some kind of “mod”-stuff has been added. But just from  
reading the tickets I didn’t got it. Is that for rendering based on  
“themes” ?

---

<div class="post-metadata">

**Author:** ![Roberto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8baadc/32.png) [@Roberto](https://www.ruby-forum.com/u/Roberto)\
**Post date:** [August 7, 2005, 5:56pm UTC](https://www.ruby-forum.com/t/what-does-the-new-mod-stuff/47495/2 "2005-08-07T17:56:18Z")

</div>

Roberto wrote:

> Hi all
> 
> I just saw that some kind of “mod”-stuff has been added. But just from  
> reading the tickets I didn’t got it. Is that for rendering based on  
> “themes” ?

Hi there Roberto.

Most everything you see displayed in RForum using CSS, so that will  
probably be the easiest way to change the look/feel of the application.

I am working on a mod-system branch for RForum. What is the mod system,  
you ask? It will be plugin-type system for people to add new features  
to RForum.

I’m fairly new to the RForum team, so I don’t have a great idea about  
what sort of feature set they have in mind, but here is an example of  
what a mod might do:

Lets say that someone wants to have an “avatar” type system where each  
user can have small image/avatar that shows up just below their name  
when they post. Such a module would require modificaton of the  
underlying database, and extending the existing functionality of the  
controllers, and updating the view templates.

They can create an “avatar” module/plugin (or perhaps use one someone  
else already developed) that will enable this functionality. These  
modules sit completely outside the RForum core, thus allowing the  
plugin’s to operate without ever having to modify the RForum code (thus  
making installation and removal a breeze).

My goal for the module system is to make it easier to install/remove  
than any other BB mod system out there. For example, phpBB2 mods  
require you to go in and manually edit all the necessary template files.  
We are hoping to avoid this completely. It is because RForum was built  
with Ruby and Rails that this type of approach is even possible.

An idea of what other functionality might be enabled through mods  
(again, some of these might end up in the RForum core, I just don’t know  
what they have planned):

Code syntax highlighting  
Avatars  
Smilies  
Extending user profiles  
A user ranking system  
Creating new user roles  
etc.

Hope that clears things up.

Matt

---

<div class="post-metadata">

**Author:** ![Roberto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8baadc/32.png) [@Roberto](https://www.ruby-forum.com/u/Roberto)\
**Post date:** [August 7, 2005, 9:07pm UTC](https://www.ruby-forum.com/t/what-does-the-new-mod-stuff/47495/3 "2005-08-07T21:07:22Z")

</div>

> An idea of what other functionality might be enabled through mods  
> (again, some of these might end up in the RForum core, I just don’t know  
> what they have planned):
> 
> Code syntax highlighting  
> Avatars  
> Smilies  
> Extending user profiles  
> A user ranking system  
> Creating new user roles  
> etc.
> 
> Hope that clears things up.
> 
> Matt

Matt, thanks very much for clarification. This is very interesting for  
me, especially the avatar thing, because right now I have written a  
Browser plugin which aims to be a P2P/Audio/Video/DOM-Injector Engine  
based on aaLib (see [http://www.wigiwigi.com](http://www.wigiwigi.com)). Right now all it does is  
avatar-realtime-capture by taking a snapshot from a Webcam and uploads  
it (HTTP-Post) to my simple RubyOnRails controller. Next Step is to  
integrate that into a RoR Forum, and rforum is the only one ! So I think  
I will soon start to play with the stuff you are adding for my avatar  
integration !

btw. I can’t log into the forum anymore (maybe I forgot my password ?).  
Matt can you be reached by e-mail or IM ? My email is rsaccon at gmail  
dot com.

Roberto

---

<div class="post-metadata">

**Author:** ![Roberto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8baadc/32.png) [@Roberto](https://www.ruby-forum.com/u/Roberto)\
**Post date:** [August 7, 2005, 5:56pm UTC](https://www.ruby-forum.com/t/what-does-the-new-mod-stuff/47495/4 "2005-08-07T17:56:18Z")

</div>

Roberto wrote:

> Hi all
> 
> I just saw that some kind of “mod”-stuff has been added. But just from  
> reading the tickets I didn’t got it. Is that for rendering based on  
> “themes” ?

Hi there Roberto.

Most everything you see displayed in RForum using CSS, so that will  
probably be the easiest way to change the look/feel of the application.

I am working on a mod-system branch for RForum. What is the mod system,  
you ask? It will be plugin-type system for people to add new features  
to RForum.

I’m fairly new to the RForum team, so I don’t have a great idea about  
what sort of feature set they have in mind, but here is an example of  
what a mod might do:

Lets say that someone wants to have an “avatar” type system where each  
user can have small image/avatar that shows up just below their name  
when they post. Such a module would require modificaton of the  
underlying database, and extending the existing functionality of the  
controllers, and updating the view templates.

They can create an “avatar” module/plugin (or perhaps use one someone  
else already developed) that will enable this functionality. These  
modules sit completely outside the RForum core, thus allowing the  
plugin’s to operate without ever having to modify the RForum code (thus  
making installation and removal a breeze).

My goal for the module system is to make it easier to install/remove  
than any other BB mod system out there. For example, phpBB2 mods  
require you to go in and manually edit all the necessary template files.  
We are hoping to avoid this completely. It is because RForum was built  
with Ruby and Rails that this type of approach is even possible.

An idea of what other functionality might be enabled through mods  
(again, some of these might end up in the RForum core, I just don’t know  
what they have planned):

Code syntax highlighting  
Avatars  
Smilies  
Extending user profiles  
A user ranking system  
Creating new user roles  
etc.

Hope that clears things up.

Matt

---

<div class="post-metadata">

**Author:** ![Roberto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8baadc/32.png) [@Roberto](https://www.ruby-forum.com/u/Roberto)\
**Post date:** [August 8, 2005, 5:34pm UTC](https://www.ruby-forum.com/t/what-does-the-new-mod-stuff/47495/5 "2005-08-08T17:34:43Z")

</div>

Matt, I just downloaded and instllad the svn branch with your mod stuff,  
but I couldn’t find out how to “activate” your feed, rank or avatar  
module. Is this possible already ?

---

<div class="post-metadata">

**Author:** ![Roberto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8baadc/32.png) [@Roberto](https://www.ruby-forum.com/u/Roberto)\
**Post date:** [August 8, 2005, 7:42pm UTC](https://www.ruby-forum.com/t/what-does-the-new-mod-stuff/47495/6 "2005-08-08T19:42:28Z")

</div>

Roberto wrote:

> Matt, I just downloaded and instllad the svn branch with your mod stuff,  
> but I couldn’t find out how to “activate” your feed, rank or avatar  
> module. Is this possible already ?

Thanks for taking an interest in the mod system. I have setup an  
installation script to for managing mods, but you can install them like  
this (it won’t always be this complicated):

1. Copy the mod tar.gz to the RAILS\_ROOT (/path/to/your/railsapp).
2. tar -zxvf modname.tar.gz
3. Unfortunately, I haven’t been consistent with this part yet … I  
think the rank and feeds modules will unpack the template files to  
modules/views/, but for avatar you need to copy modules/avatar/views/  
over to modules/views. All modules must share the same template space  
so that A) Rails has a central location for looking up mod templates and  
B) Some mods modify the same template, so those changes must be merged  
somehow.
4. For each installed module, add the necessary require statement to  
modules/modules.rb. For example, for feeds, add “require  
‘feeds/feeds’”. If you are in development mode, and are having  
problems, try changing the “require” to “require\_dependency”.
5. Edit the module configuration file as you see fit. These are found  
in modules/modulename/modulename.rb
6. Create the directory public/images/modules/avatar/ for storing  
images.
7. You need to add a column to the users table in your database if you  
want to use the Avatar plugin. If you are using MySQL, login to mysql  
and do this:

mysql\> alter table users add avatar varchar(255);

1. Restart your webserver

I am working on a script to manage installation/removal, which will  
basically do everything described above for you.

The last caveat is that module Rank and module Avatar modify the same  
template file, views/topic/\_post.rhtml. If you want both, start with  
Avatar’s views/topic\_post.rhtml and add the necessary 1 line needed in  
Rank’s template. Again, I hope to make this sort of thing easier to  
manage with a script.

Module support is very alpha right now, so I can’t make any promises.  
Feel free to email me at `belorion at gmail dott com`, and drop [rForum]  
in the subject line to make sure I see it.

Matt

p.s. The avatar module does not, at this time, allow you to upload an  
avatar directly from your desktop. You can however give it a URL to an  
image you want to use. Or, likewise, just drop any images into the  
public/images/modules/avatar/ directory. If it pulls down an avatar  
from a remote URL, it will automiatically resize it based on the  
dimensions specified in modules/avatar/avatar.rb. Unfortunately, this  
requires you have the ruby library RMagick installed (this, again, will  
eventually be handled by the installation script). If you don’t have  
RMagick, that’s fine, you just can’t use the remote image download (and  
just manually upload to the aforementioned images directory). Hope that  
helps.

---

<div class="post-metadata">

**Author:** ![Roberto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8baadc/32.png) [@Roberto](https://www.ruby-forum.com/u/Roberto)\
**Post date:** [August 10, 2005, 7:07pm UTC](https://www.ruby-forum.com/t/what-does-the-new-mod-stuff/47495/7 "2005-08-10T19:07:17Z")

</div>

It is now Wed Aug 10 17:06:07 GMT 2005. On the forums topic listing it  
say that this topic’s last post was “yesterday”, but clearly it has been  
longer than that.

---

<div class="post-metadata">

**Author:** ![Roberto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8baadc/32.png) [@Roberto](https://www.ruby-forum.com/u/Roberto)\
**Post date:** [August 14, 2005, 5:53pm UTC](https://www.ruby-forum.com/t/what-does-the-new-mod-stuff/47495/8 "2005-08-14T17:53:20Z")

</div>

wrote:

> It is now Wed Aug 10 17:06:07 GMT 2005. On the forums topic listing it  
> say that this topic’s last post was “yesterday”, but clearly it has been  
> longer than that.  
> sdf;kjlsjdf  
> lkjsdfl

---

<div class="post-metadata">

**Author:** ![Roberto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8baadc/32.png) [@Roberto](https://www.ruby-forum.com/u/Roberto)\
**Post date:** [August 8, 2005, 7:43pm UTC](https://www.ruby-forum.com/t/what-does-the-new-mod-stuff/47495/9 "2005-08-08T19:43:19Z")

</div>

wrote:

> Thanks for taking an interest in the mod system. I have setup an  
> installation script to for managing mods, but you can install them like  
> this (it won’t always be this complicated):

I meant that “I still have to setup an installation script” … cause I  
don’t have one yet 😛

Matt
