Inside Paulo Abrantes' head
[ start | index | login or register ]
start > 2007-04-07 > 1

SnipSnap Developing: Planning a fork

Created by pabrantes. Last edited by pabrantes, one year and 90 days ago. Viewed 1,189 times. #5
[diff] [history] [edit] [rdf]
labels
attachments

SnipSnap Developing: Planning a fork

Like the title is saying I'm planning to go for a fork.
There are various reasons for doing such move, but here are a few (and probably also the strongest ones):
  1. The development is stopped;
  2. The SVN is dead;
  3. Stephan as >>announced is retirement from snipsnap;
  4. SnipSnap as been my pet-project for more than a year;
  5. I think I can do a good job.
Currently I have no name for the fork, snipsnapNG - where NG stands for Next Generation - just sounds too lame… Any suggestions for the name?

I've already started a >>SVN repository, the code is being released under GPL. Since it supports anonymous read access, anyone interested can download my snipsnap version from there. Besides all the modifications I've been mentioning in my posts, I felt like giving some goodies for this first SVN release, so the additional features are:

  • Security Fix against XSS on the Search Macro
  • Security Fix regarding config snip (which can be accessed via diff or version servlets by anyone)
  • Integration of Digg It feature
  • Integration of Del.icio.us feature
  • Integration of RSS comments for each snip features
  • Configurability of the last three points, the user can select if it's interested or not to have each feature.
The digg it, delicious and rss comment features can be now seen in my blog, at the upper right corner of each snip, or posts in case of displaying a weblog snip. To add or remove each one of them is so simple has toggle a feature on config snip to true or false.

I'm planning not only in deliver more features but also refactor some code that I've already seen. Not that I think Stephan and Leo didn't do things good, but mostly because I want things on my way.

Features to be implemented include:

  • Configurable snapPreview integration
  • Configurable meta-information
  • Configurable Access Control for each snip
  • Configurable secure login and register
  • Better CATPCHA Support (that includes sound support)
  • Many other, keep tuned to know about them.
If anyone has any suggestions to improve this version of snipsnap, please comment!

Icon-Comment AdaHsu, one year and 87 days ago. Icon-Permalink

I do like such features as follow…
  • Access Control for each snip: Yes, some logs just a private log, not public.
  • CATPCHA support
  • Integration of Digg It / Del.icio.us feature: but also Yahoo/Google bookmarks or others.
  • A completely emoticon / smileys system: add a new smiley/emoticon is not easy ( write the new code, compile , copy jar file, restart jsp container ). Some of blog site use javascript to implement this feature, it seems a easy way but I am tring to understand how it does.
Some thing about the forked version:
  • maybe use maven 2 to manage the project status, ThoMo had a >>Radeox maven2 project.
  • I suggest to use a newest version of lucene library because v1.2 can not fully support CJK. Currently I used 1.9.1 for it.
  • hmm… the name of the fork version is really a question...
Just fixed some words.... :p

Icon-Comment pabrantes, one year and 88 days ago. Icon-Permalink

A completely emoticon / smileys system: add a new smiley/emoticon is not easy ( write the new code, compile , copy jar file, restart jsp container ). Some of blog site use javascript to implement this feature, it seems a easy way but I am tring to understand how it does.

Well what about the possibility of having a dynamic filter? For example a filter that matches the regex (@[a-z](.*)) and then checks a configuration snip, for example "space/smiles" where you have a simple property name: image name. That way you can add smiles at runtime with no worries and it works better than using javascript (since even browsers without javascript will have smiles). Maybe tonight I'll implement such concept to see if it works well.

maybe use maven 2 to manage the project status, ThoMo had a >>Radeox maven2 project.

Hmm, I'm not a maven user, for what I've seen it's quite a configuration killer (maybe I'm wrong). We could although have both build systems, ant and maven. What are the pros and cons of using maven instead of ant for the build process?

I suggest to use a newset version of lucene library because v1.2 can not fully support CJK. Currently I used 1.9.1 for it.

Thanks for the suggestion I'll make the change.

Are you interested in write access to the SVN repository?

Icon-Comment pabrantes, one year and 88 days ago. Icon-Permalink

Maybe tonight I'll implement such concept to see if it works well.

I've just finished implementing a test filter which I called SmileFilter, although it's more an imageFilter since it can be that generic.

It has become quite simple to add new smiles to snipsnap, no need for writting any code at all, not even restart to the container.

I still haven't commited it to the SVN project, not put it in my blog - maybe tomorrow or so - so here's the code:

/** * Image Filter for SnipSnap Blog/Wiki * * Copyright 2006-2007 Paulo Abrantes (pabrantes@pabrantes.net) * * --LICENSE NOTICE-- * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * --LICENSE NOTICE-- * */

package org.snipsnap.pabrantes.filter;

import java.sql.Timestamp;

import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.radeox.filter.Filter; import org.radeox.filter.context.FilterContext; import org.radeox.filter.regex.RegexFilter; import org.radeox.filter.regex.RegexReplaceFilter; import org.snipsnap.snip.Snip; import org.snipsnap.snip.SnipSpace; import org.snipsnap.snip.SnipSpaceFactory;

public class SmileFilter extends RegexReplaceFilter implements Filter {

private static Log log = LogFactory.getLog(SmileFilter.class);

private Snip snip; private Timestamp lastModificationDate;

public SmileFilter() { super(); loadSnip(); }

private void loadSnip() { SnipSpace space = SnipSpaceFactory.getInstance(); this.snip = space.load("smileyRepository"); if(snip==null) { log.warn("It seems the snip is invalid, maybe it still has to be created!"); } }

private void loadSmiles() { clearRegex(); this.lastModificationDate = snip.getMTime(); String content = snip.getContent(); String[] smiles=content.split("\r\n\r\n"); for(int i=0;i<smiles.length;i++) { String[] components = smiles[i].split("="); addRegex(components[0],"<img src="space/smileyRepository/" + components[1] + "" />"); } }

@Override public String filter(String arg0, FilterContext arg1) { if(snip==null) { loadSnip(); } if(snip.getMTime()!=lastModificationDate) { loadSmiles(); } return super.filter(arg0, arg1); } }

For me, the cool thing is the following piece of code:

if(snip.getMTime()!=lastModificationDate) { loadSmiles(); }

This gives you hot deploy feature. While filtering if a change on your smileyRepository snip is detected the entire repository content will be reloaded (maybe I should do an incremental load)

The only boring thing is the creation of the smileyRepository, since you have to upload images and write the code. Oh and by the way, the syntax is the following:

REGEX=imageName.png
BLANK_LINE
REGEX2=imageName2.png

imageName.png will be attached to smileyRepository snip. Also remember the 1st field is a regex, so for example to match smiley it won't be smiley but actually :-\).

Icon-Comment AdaHsu, one year and 87 days ago. Icon-Permalink

This gives you hot deploy feature. While filtering if a change on your smileyRepository snip is detected the entire repository content will be reloaded (maybe I should do an incremental load)

Wow, You mean create a snip called smileyRepository , add regex there, upload images there, and then we can use smileys for any snips, right ?

Good Job ! but can make snip name smileyRepository load from application.conf ?

Hmm, I'm not a maven user, for what I've seen it's quite a configuration killer (maybe I'm wrong). We could although have both build systems, ant and maven. What are the pros and cons of using maven instead of ant for the build process?

I used maven 2 because my office needs a project report for monitoring status, javadocs, and others. But main purpose for me is management the library dependencies. I do not need to put the jar library files on SVN repository if use maven2.

Yes, those jar file will download to local repository automatically, but if some one needs a different version of some library, just modify the config file ( pom.xml ) and maven2 will download the library and all dependencies files.

A disadvantages for maven2 is: the build-in plugins can not support ftp the .war file to a remote jsp container, maven2 need each plugins for all jsp containers.

I tried to build a snipsnap maven2 project before, but I failed.

Are you interested in write access to the SVN repository?
hmm.... I'll mail you my SVN account.

And, I will anounce the folk version's infomation on my blog.

Icon-Comment pabrantes, one year and 87 days ago. Icon-Permalink

Wow, You means create a snip called smileyRepository , add regex there, upload images there, and then we can use smileys for any snips, right ?

Yes, that's it.

Good Job ! but can make snip name smileyRepository load from application.conf ?

Thanks. Well, yes it's possible to create a configuration property to allow the a dynamic selection of that smileyRepository. That's a good idea, thanks!

I used maven 2 because my office needs a project report for monitoring status, javadocs, and others

Well my experience with maven 2 is zero. At my work we use ant. But it's always good to learn new things… Although I've looked at some maven2 build files and they just looked creepy! hehe

When you say project report, you mean like cvs or svn stats?

I do not need to put the jar library files on SVN repository if use maven2.

That sounds good, but I remember the problems with that when trying to build >>CAS and maven was downloading a wrong jar...maybe due to misconfiguration, not really sure about that.

hmm.... I'll mail you my SVN account.

Ok, just send it to pabrantes AT pabrantes.net

And, I will anounce the folk version's infomation on my blog.

Cool! Thanks :)

Icon-Comment AdaHsu, one year and 87 days ago. Icon-Permalink

When you say project report, you mean like cvs or svn stats?

Just like this site: >>Tapestry Project Information, those documents were generated by maven2. JavaDocs and JUnit Test Report also can be generated by maven2, too.

Ok, just send it to pabrantes AT pabrantes.net

2 mails had been send, one for svn accounts, second is a pdf document.

Icon-Comment pabrantes, one year and 87 days ago. Icon-Permalink

Just like this site: Tapestry Project Information, those documents were generated by maven2. JavaDocs and JUnit Test Report also can be generated by maven2, too.

I see, that's interesting I have to check it better also read the PDF you've sent me (Thanks for that by the way).

2 mails had been send, one for svn accounts

You now have write access to the repository. Behave! laugh

Icon-Comment pabrantes, one year and 87 days ago. Icon-Permalink

Oh and welcome aboard Ada! Hope you're ready for some wild software developing hehehe.

Icon-Comment pabrantes, one year and 87 days ago. Icon-Permalink

Here's the v0.2 of the filter:

/** * Image Filter for SnipSnap Blog/Wiki * * Copyright 2006-2007 Paulo Abrantes (pabrantes@pabrantes.net) * * --LICENSE NOTICE-- * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * --LICENSE NOTICE-- * */

package org.snipsnap.pabrantes.filter;

import java.sql.Timestamp;

import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.radeox.filter.Filter; import org.radeox.filter.context.FilterContext; import org.radeox.filter.regex.RegexReplaceFilter; import org.snipsnap.app.Application; import org.snipsnap.render.filter.context.SnipFilterContext; import org.snipsnap.snip.Snip; import org.snipsnap.snip.SnipSpace; import org.snipsnap.snip.SnipSpaceFactory;

public class SmileFilter extends RegexReplaceFilter implements Filter {

private static Log log = LogFactory.getLog(SmileFilter.class);

private static Snip snip = null;

private Timestamp lastModificationDate = null;

public SmileFilter() { super(); }

private Snip getSnip() { if(snip==null) { String snipRepository = Application.get().getConfiguration().get( "app.smileRepository"); if (snipRepository != null) { SnipSpace space = SnipSpaceFactory.getInstance(); snip = space.load(snipRepository); if (snip == null) { log.warn("It seems the snip is invalid, maybe it still has to be created!"); } } } return snip; }

private void loadSmiles() { clearRegex(); this.lastModificationDate = snip.getMTime(); String content = snip.getContent(); String[] smiles = content.split("\r\n\r\n"); for (int i = 0; i < smiles.length; i++) { String[] components = smiles[i].split("="); addRegex(components[0], "<img src=\"space/" + snip.getName() + "/" + components[1] + "\" />"); } }

private void checkForModifications() { Snip snip = getSnip(); if (snip != null && snip.getMTime() != lastModificationDate) { loadSmiles(); } }

@Override public String filter(String text, FilterContext context) { Snip snip = getSnip(); SnipFilterContext filterContext = (SnipFilterContext) context; if (snip != null && !filterContext.getSnip().getName().equals(snip.getName())) { checkForModifications(); return super.filter(text, context); } return text; }

}

Modifications:

  • You now define which snip will have the regex=image in the Config snip, under the property app.smileRepository. Example, "app.smileRepository=mySmiles" will point to space/mySmiles snip.
  • The filter as the following exceptions:
    • If the snip being rendered is the smile repository the filter isn't applied. So if a regex and the text are actually the same it doesn't get filtered into an image, becoming IMAGE=imageName on the configuration snip - this was happening to me while testing for example the :S smile.
    • If no property at the configuration file was defined filtering is skipped
    • If a property at the configuration was specified but with a non-existing snip, filtering will be skipped but problem logged.
  • If the repository is modified on the fly on the Config property a container restart is needed, no hot swap here I didn't thought it was needed.

Icon-Comment AdaHsu, one year and 87 days ago. Icon-Permalink

Hmm...

I think I should really want to create a vmware machine to test this forked version...

Do you integrate all of your macros into the snipsnap source tree ?! I think some macros/filters which not hack into snipsnap core can be saved in his owned path which maybe called macros/filters, How about your opinion ?

Icon-Comment AdaHsu, one year and 87 days ago. Icon-Permalink

New feature opinion:

How about add a >>avatar like >>gravatar or >>MyBlogLog for commenter ( Shown only at comment area ) ?

IMPORTANT: This is not a urgent feature! Please do not sacrifice your rest time for those features.

Icon-Comment pabrantes, one year and 86 days ago. Icon-Permalink

Do you integrate all of your macros into the snipsnap source tree ?! I think some macros/filters which not hack into snipsnap core can be saved in his owned path which maybe called macros/filters, How about your opinion ?

I agree with you, actually I've been also thinking in doing that. Create a project separated from this snipsnap fork but that deppends on snipsnap.

On my computer I already have something using the great ant build file I presented a while ago in >>News update - That I've changed a bit two days ago to also compile filters.

I'll create the new project and let you know when it's in the repository.

New feature opinion:

How about add a avatar like gravatar or MyBlogLog for commenter ( Shown only at comment area ) ?

Well I think the simplest implementation is going for a convention, for example, upload an avatar to the user's snip with name avatar.png or .jpg or any other image extension.
Then the user object would have hasAvatar() which would return true on and on the JSP we would do if snip.owner.avatar is true then show the image.

IMPORTANT: This is not a urgent feature! Please do not sacrifice your rest time for those features.

Don't worry I didn't (nor will) sacrifice my rest time.

Icon-Comment AdaHsu, one year and 86 days ago. Icon-Permalink

Well I think the simplest implementation is going for a convention, for example, upload an avatar to the user's snip with name avatar.png or .jpg or any other image extension. Then the user object would have hasAvatar() which would return true on and on the JSP we would do if snip.owner.avatar is true then show the image.

Seems more easy, >>http://site.gravatar.com/site/implement says use a <img src="http://www.gravatar.com/avatar.php?gravatar_id=<%= MD5( email ) %>" alt=""> will show the image which saved at gravatar.

so, when show the comments, check snip.owner.avatar to decide write a code '<div class="gravatar"><img src="...."></div>' to his own comment or not.

Icon-Comment pabrantes, one year and 86 days ago. Icon-Permalink

Seems more easy, >>>>http://site.gravatar.com/site/implement says use a <img src="http://www.gravatar.com/avatar.php?gravatar_id=<%= MD5( email ) %>" alt=""> will show the image which saved at gravatar.

Hmmm yes… Although like that you are making the user create a gravatar account to be able to use avatars. Maybe the two implementations, for the ones who want to use gravatar and the ones who don't.

My only problem with gravatar is when do I know that the user really wants to display the avatar? Or it's like a feature on and off, Show avatars Vs Don't show avatars… Maybe this last option is the best approach, at least for now. After having avatar support, we can elaborate more on it.

Icon-Comment AdaHsu, one year and 86 days ago. Icon-Permalink

My only problem with gravatar is when do I know that the user really wants to display the avatar? Or it's like a feature on and off, Show avatars Vs Don't show avatars… Maybe this last option is the best approach, at least for now. After having avatar support, we can elaborate more on it.

If user has no gravatar account, gravatar will send a default image like >>this page. This page shows 2 avatar source.

But, a switcher in application.conf is needed ( snip.comment.avatar=on/off/true/false ), it preserves the blog owner to open or close this feature.

hmm… my idea is, avatar is only for comments not for snips because owner can put his photo on snipsnap-portelet-1 or somewhere, comment visitor can't.

Would you mind how about to create a snip/wiki page to save the forked version's final implemented feature list ? Discuss here, but result there !

Icon-Comment pabrantes, one year and 86 days ago. Icon-Permalink

If user has no gravatar account, gravatar will send a default image like this page. This page shows 2 avatar source.

Yes, but what if a user wants do have an avatar but without signing-up to gravatar?

But, a switcher in application.conf is needed ( snip.comment.avatar=on/off/true/false ), it preserves the blog owner to open or close this feature.

Yes, I already was thinking about that too.

Would you mind how about to create a snip/wiki page to save the forked version's final implemented feature list ? Discuss here, but result there !

Sounds a good idea. Here's the page my_snipsnap_fork_feature_list

Icon-Comment AdaHsu, one year and 86 days ago. Icon-Permalink

Sounds a good idea. Here's the page my_snipsnap_fork_feature_list
I do some modifications, is this more clear or not ?

Yes, but what if a user wants do have an avatar but without signing-up to gravatar?
You mean a visitor reluctate to have a gravatar account but approve an avatar in snipsnap system? It seems to modify the database schema to save the avatar photo. But I hope we will not change any schema to preserve compatibility with official version.

Blog master has his control power, use this feature or not were decided by master but not visitor.

Oh, is our discussion for the visitor or not ?!

Icon-Comment pabrantes, one year and 85 days ago. Icon-Permalink

I do some modifications, is this more clear or not ?

Yes, thank you. Good job!

You mean a visitor reluctate to have a gravatar account but approve an avatar in snipsnap system? It seems to modify the database schema to save the avatar photo. But I hope we will not change any schema to preserve compatibility with official version.

Well I was talking about any user. Let me try to explain better my question. Let's say you have two users, X and Y, on a snipsnap with gravatar support.

Both users want to have avatars on their comments and the admin of the blog has enabled the option in the Config Snip. The only difference between both users is that X as a gravatar account and Y doesn't have one.

My question is, if Y wants to have an avatar, should we "make" him (or her) register to gravatar or, should we support some kind of local system - by local I mean within snipsnap application - that allows him (or her) to define an avatar?

Icon-Comment AdaHsu, one year and 85 days ago. Icon-Permalink

My question is, if Y wants to have an avatar, should we "make" him (or her) register to gravatar or, should we support some kind of local system - by local I mean within snipsnap application - that allows him (or her) to define an avatar?

I think, just have some description for user at registration page and let them know if he or she have a gravatar account, fill it on the email field can show their avatar in the snips.

Create a local avatar system seems a huge engineering.

However, maybe we can choose another way: use a macro like {gravatar:somebody@somewhere} . It let user do what she or he like, but user must remember put the code in snip every time.

Icon-Comment pabrantes, one year and 85 days ago. Icon-Permalink

However, maybe we can choose another way: use a macro like {gravatar:somebody@somewhere} . It let user do what she or he like, but user must remember put the code in snip every time.

I think you've just hit the solution Ada! I like this option because we let the user put the avatar wherever the users wants, from comments to blog posts to snips.

I saw you edited the features including a timeline listing, isn't that what the already existing TimeLine Macro does? You can see it here: post-history it can display only blog posts or all snips.

Icon-Comment AdaHsu, one year and 85 days ago. Icon-Permalink

post-history not exist.... :(

I know somebody writes a TimeLine macro before, but official version seems not integrated. So...

And, some bugs maybe trace:

  1. Calendar Macro: If I write some snips at the last day of a month, it won't shown at calendar macro.
  2. SearchMacro: Result count is not equal to result items count … :(

Icon-Comment AdaHsu, one year and 84 days ago. Icon-Permalink

I think you've just hit the solution Ada! I like this option because we let the user put the avatar wherever the users wants, from comments to blog posts to snips.

New approach:

Just like emoticon mechanism , in user's snip he can upload his avatar photo there, and put some code to enable his avatar.

So, combines those 2 actions, maybe we can do:

  1. Let user writes some configurations at his owned snip. User can upload his avatar there too.
  2. configurations maybe like macro format:
    1. {useSnipSnapAvatar:myavatar.gif} means show the image "myavatar.gif" for his avatar.
    2. {useGravatar:somebody@somewhere} means show the avatar from gravatar account.
    3. {useMyBlogLog:url} means show the avatar from mybloglog account.
  3. and then, When show some snips, check this snip's owner's config of avatar, and show it or not.
Wow, It sounds a intelligent design.... :p

Icon-Comment pabrantes, one year and 84 days ago. Icon-Permalink

post-history not exist.... :(
Sorry wrong link, here you go post-history.

1. Calendar Macro: If I write some snips at the last day of a month, it won't shown at calendar macro.

I've already addresses that subject in >> here. That's a bug on the binary search method in PartialSearcher object.

2. SearchMacro: Result count is not equal to result items count … :(

That's a problem with the lucene indexing/undexing. I've already noticed that issue but I did not yet tried fo find the problem.

Just like emoticon mechanism , in user's snip he can upload his avatar photo there, and put some code to enable his avatar.

In the case of emoticon mechanims, that's something is edited by the admin.
And in my opinion, making a user create a configuration snip is overkill configuration, the user should not need to do it. Although I'm not currently seeing a good solution, I have to think more about the subject. But probably the solution will be somehow based on conventions.

Icon-Comment AdaHsu, one year and 84 days ago. Icon-Permalink

Ok, when you have a decision, let me know what will you do.

And now I am tring to make 3 maven2 project for create macro/filter/formatter jars. And I named it as follows, while I finished it I will commit:

  1. snipsnap-macros
  2. snipsnap-filters
  3. snipsnap-formatters
But now, I have a trouble to find out how can maven2 get the java file list and write to META-INF/services/org.radeox.filter.Filter or some much. Because I do like the user put their plugins into path, then maven2 generate the services files just like xdoclets. After success, it may the time to replace my snipsnap to forked version.

Icon-Comment pabrantes, one year and 83 days ago. Icon-Permalink

And now I am tring to make 3 maven2 project for create macro/filter/formatter jars.

Why not make just a single project with the 3? Attention, I'm not criticizing your option just asking due to curiosity. Because I locally have a similar project and I have all the in the same project.

But now, I have a trouble to find out how can maven2 get the java file list and write to META-INF/services/org.radeox.filter.Filter or some much.

Well maybe you should look at the ant buildfile in the >>News Update that I already mentioned in this thread which does that generation on the fly.

Maybe we could have this projects with both build systems, since I'm more fond of ant and your fond of maven2. I think it would be a plus.

Also I had an idea about the name for the fork: SnipIt
Since everything is a snip, if you want to write content you have to create a snip… "So Snip everything, just Snip it" laugh

Icon-Comment AdaHsu, one year and 83 days ago. Icon-Permalink

Why not make just a single project with the 3? Attention, I'm not criticizing your option just asking due to curiosity. Because I locally have a similar project and I have all the in the same project.

Because of:

  1. Maven2 one build file can only generate one jar/war file, even it's multi-projects still create several projects and then a main project build file to collect them.
  2. I try to find some tips to make maven2 create services files automatically. If no way to do that ( use ant expression at maven2 seems something wrong… :( ), I will combine it to one.
Also I had an idea about the name for the fork: SnipIt Since everything is a snip, if you want to write content you have to create a snip… "So Snip everything, just Snip it" laugh

That sounds good ! so package name ( name space ) should changed to what ? snipit.org/snipit.net had been registered. so call it like org.snipsnap.snipit.filter.SmileFilter ?

It's weekend, take a rest.

Icon-Comment pabrantes, one year and 82 days ago. Icon-Permalink

That sounds good ! so package name ( name space ) should changed to what ? snipit.org/snipit.net had been registered. so call it like org.snipsnap.snipit.filter.SmileFilter ?

Ok Snip It it will be, maybe the feature list name should be changed to Snip it. Regarding the package org.snipsnap.snipt sounds good to me.

It's weekend, take a rest.

Yes, I'm resting, still I implemented a few features hehehe… Enjoy your weekend also.

Icon-Comment AdaHsu, one year and 81 days ago. Icon-Permalink

I had tought that maybe snipsnap-core use ant as building tool is a good idea. But the other plugins can use maven2, and I had give up for generating META-INF/services/org.radeox.filter.Filter on-the-fly.

I will make a maven2 project for snipsnap plugins.

You changed theme again ?

Icon-Comment pabrantes, one year and 80 days ago. Icon-Permalink

… and I had give up for generating META-INF/services/org.radeox.filter.Filter on-the-fly.

Doesn't maven2 has some kinda of replacing filter or so, that you can use to generate it, on the fly?

You changed theme again ?

Yes I did, what do you think?

Icon-Comment AdaHsu, one year and 79 days ago. Icon-Permalink

Doesn't maven2 has some kinda of replacing filter or so, that you can use to generate it, on the fly?

maven2 has a resources filter, but, I can not find how to get the file list automatically. So, at this moment, I will set those info at pom.xml file by hand.

Yes I did, what do you think?

Good, it's very Good, but… it seems not integrated in Rev. 18 ?

and also, do you commit in SmileFilter into SVN ?! I can not found where the org.snipsnap.snipit package is. Or you create a path/repository for those plugins ?

Now, I am creating a vmware linux machine because I tested snipit yesterday and it made my tomcat crashed, I should test how to migrate my blog system to snipit.

Icon-Comment pabrantes, one year and 79 days ago. Icon-Permalink

Good, it's very Good, but… it seems not integrated in Rev. 18 ? ...and also, do you commit in SmileFilter into SVN ?!
AdaHsu

Yes, neither the theme nor the filter are commited. I'll have to commit the theme and I'm thinking in creating a new project only for the macros, filters, etc… Although I did not yet had the time to do it. I'll probably do this until next week. (I hope)

Now, I am creating a vmware linux machine because I tested snipit yesterday and it made my tomcat crashed, I should test how to migrate my blog system to snipit.
AdaHsu

Strange...I'm running snipsnap with jetty, and hhaven't tested it with tomcat yet, but I'll look into it… Can you tell me the tomcat's stacktrace? (The one who's in the catalina.out log) Thanks.

Icon-Comment AdaHsu, one year and 79 days ago. Icon-Permalink

I'm thinking in creating a new project only for the macros, filters, etc…

Create a repository path named: snipit-plugins ?!

Icon-Comment pabrantes, one year and 79 days ago. Icon-Permalink

Yes… That's my idea. Or are you seeing any problem with that?

Icon-Comment AdaHsu, one year and 79 days ago. Icon-Permalink

Just Ant and Maven2 have different directories layout.

I still prefer to use maven2 for snipit-plugins primary build tool because it can generate some useful reports and deploy them to a site.

For my testing site, I think I will create some sample report site using maven2 this weekend, and them let we check what build tools it better.

Icon-Comment pabrantes, one year and 78 days ago. Icon-Permalink

Well what we can do is having the same projects with two different builds, ant and maven.

Icon-Comment AdaHsu, one year and 74 days ago. Icon-Permalink

A SnipIt/SnipSnap report is >>here !

Icon-Comment AdaHsu, one year and 53 days ago. Icon-Permalink

hmm...

Do pabrantes have a heavy work ?

Icon-Comment pabrantes, one year and 26 days ago. Icon-Permalink

Hey AdaHsu sorry for the delay...yes a bit of heavy work! But I'm back now smiley The reports look good! But should we currently be interested in reports? Or should we just worry about them later?

Icon-Comment AdaHsu, one year and 26 days ago. Icon-Permalink

No, It doesn't !

My first issue for now is check all i18n messages and write them into messages.properties and so on. Then, we can announce the first version of snipit !

Icon-Comment pabrantes, one year and 24 days ago. Icon-Permalink

My first issue for now is check all i18n messages and write them into messages.properties and so on
AdaHsu

Great! If you need my help on that for anything let me know.

Icon-Comment AdaHsu, one year and 24 days ago. Icon-Permalink

hmm...

I commit a zh_TW message translation at rev 19, but it only contains original snipsnap's messages.

SO, I need to know how many plugins you wrote before and a list of the i18n message's value-string.

Icon-Comment pabrantes, one year and 21 days ago. Icon-Permalink

Ok Ada, I think I can finish the ACL interface this weekend and commit the all thing along with the plugins so you can also continue your work. I'll be in touch by email with you or so.

Icon-Comment derjohn, one year and 21 days ago. Icon-Permalink

Hey folks, I am in! smiley As mentioned via p-mail to pabrantes, I would love to see snipscale merged in: >>http://www.xs4all.nl/~kzeil/en/project/snipsnap/index.html. I might notice that it currently only works on snip, but not on
- maybe someone can fix that? It's great for creating ablums!

Furthermore I would like to know if I can replace the snipsnap.jar (utto-b3) with the the one I build from this CVS (I want a capcha .... !) or do I have to convert some structure? (DB, files ...) ?

rgds, derjohn

Icon-Comment pabrantes, one year and 20 days ago. Icon-Permalink

Hello derjohn,

First of all welcome! smiley
I'm gonna add snipscale to my_snipsnap_fork_feature_list.

might notice that it currently only works on snip, but not on - maybe
derjohn

I'm sorry but I didn't quite understand you there… Could you please explain better? Since it's GPL (I've just checked the license) maybe I can do something about it..

Furthermore I would like to know if I can replace the snipsnap.jar (utto-b3) with the the one I build from this CVS (I want a capcha .... !) or do I have to convert some structure? (DB, files ...) ?
derjohn

No you don't replace only the snipsnap.jar, you compile the version you've checkout and then execute the run command that is in the base directory. There are no changes on the structure so it should run without any problems.

I myself am running with a file system storage and the switch was done with no problem, AdaHsu, if I'm not wrong, is using a database and also managed to switch with no problem. But even if we had no problems at all I advice you to first backup everything! If you need any more help regarding the installation please post or send me an email, I'll gladly help you out!

Regards,

Paulo

Icon-Comment derjohn, one year and 18 days ago. Icon-Permalink

Hey, I switched to your pimped-up snipsnap. Where can I configure the RSS stuff? The link looks like: >>http://exec/rss?snip=start/2007-06-05/1&type=commentsForPost . But "exec" is obviously no DNS name …

Icon-Comment pabrantes, one year and 17 days ago. Icon-Permalink

That's because you are missing the app.real.host in you're config snip. For example in my case I have app.real.host defined as www.pabrantes.net

I know I should document all these things somewhere… I'm working on it smiley

Icon-Comment AdaHsu, one year and 17 days ago. Icon-Permalink

I am back...

I myself am running with a file system storage and the switch was done with no problem, AdaHsu, if I'm not wrong, is using a database and also managed to switch with no problem. But even if we had no problems at all I advice you to first backup everything! If you need any more help regarding the installation please post or send me an email, I'll gladly help you out!

Paulo

Yes, I run on PostgreSQL and Tomcat 5.5, It runs very well !

I know I should document all these things somewhere… I'm working on it

Paulo

Oh Oh...

I think I must modify my implemented macros for i18n support, can you tell me where can I find a referenced code for it ?

Icon-Comment derjohn, one year and 16 days ago. Icon-Permalink

AdaHsu, what Macros did you code? Where con I look at them?

@Paulo: What about makeing one snip per macro on your blog. We could write the docs setp by setp on the snip.

rgds, j.

Icon-Comment derjohn, one year and 16 days ago. Icon-Permalink

Paulo,

app.real.host=blog.derjohn.de was already set in the config snip. But there is still "exec" in the "Comments Feed" Function.

rgds, derjohn

Icon-Comment pabrantes, one year and 16 days ago. Icon-Permalink

Paulo, app.real.host=blog.derjohn.de was already set in the config snip. But there is still "exec" in the "Comments Feed" Function.
derjohn

The exec should show up, but before should be written the value that is in the app.real.host variable, making the link http://${app.real.host}/exec/rss?etc etc...

I have it currently working with no problem… It seems I have to test it on tomcat also.

Icon-Comment pabrantes, one year and 16 days ago. Icon-Permalink

I think I must modify my implemented macros for i18n support, can you tell me where can I find a referenced code for it ?
AdaHsu

Well any base macro - such as WeblogMacro - should help out… But don't even worry about watching the macros, it's pretty simple to implement i18n support, you just need to use ResourceManager.

ResourceManager.getString("i18n.messages","label");

In the case of ParamDescription which returns a String I suggest you to do the same thing that Leo and Stephan were doing:

ResourceManager.getString("i18n.messages","label").split(";");

Then you just create the labels and that's it!

Icon-Comment AdaHsu, one year and 16 days ago. Icon-Permalink

AdaHsu, what Macros did you code? Where con I look at them?

derjohn

Because I need a <fieldset> HTML element support, so a macro named "fieldset" was borned, but I have not commit because i18n messages support.

Well any base macro - such as WeblogMacro - should help out… But don't even worry about watching the macros, it's pretty simple to implement i18n support, you just need to use ResourceManager.

pabrantes

at far far ago, I try to create an i18n-support macro, but it couldn't be compiled… I will try it again.

Icon-Comment AdaHsu, one year and 6 days ago. Icon-Permalink

Hi, pabrantes:

I checkout the MacrosAndFilters , but seems the build.xml not generate all jars while typing ant make-world , it only generate 4 jars such as AdSenseMacro.jar, ICalMacro.jar, LatestPosts.jar, MostViewPosts.jar .

Icon-Comment AdaHsu, one year and 5 days ago. Icon-Permalink

Sorry, another problem:

In SmileFilter, this code can not work. It always return a null value, even if I try to get "app.path", too.

String snipRepository = Application.get().getConfiguration().get("app.smileRepository");

Icon-Comment pabrantes, one year and 3 days ago. Icon-Permalink

I checkout the MacrosAndFilters , but seems the build.xml not generate all jars while typing ant make-world , it only generate 4 jars such as AdSenseMacro.jar, ICalMacro.jar, LatestPosts.jar, MostViewPosts.jar .
AdaHsu

Yes that's true, when I first wrote that build file those were the only ones that made part of the "world". Then I kept adding tasks but never made make-world deppend on them, but it's easy to take care of that.

In SmileFilter, this code can not work. It always return a null value, even if I try to get "app.path", too.
AdaHsu

That is indeed strange derjohn is also having the same problem and both of you are using tomcat as a container, it sounds to me that it's some problem with that I really have to look into it. Meanwhile could you just make a simple test running snipsnap as a standalone (with jetty) and see if the behaviour is the expected? Thanks.

Icon-Comment derjohn, one year and 3 days ago. Icon-Permalink

Hey, nice that AdaHsu confirmed my buglet. Currently I am on the road for a project, so I dont have time to move to standalone mode. And: I have mysql running, how would I import data?

rgds, derjohn

Icon-Comment pabrantes, one year and 3 days ago. Icon-Permalink

Hello derjohn,

Since I haven't change anything in the storage system (yet) starting snipIt should be enough for it to detect the database and start running from there - like your snipsnap version does. If that doesn't happen please let me know and do the following:

  1. Login on your snipsnap as administrator
  2. Go to the administration interface
  3. Export all wiki's information (including users)
  4. Import the XML file on sniptIt

Icon-Comment AdaHsu, one year ago. Icon-Permalink

  1. I find why my first i18n support were failed, I used a older version of radeox.jar !
  2. Maybe I will try standalone version this weekend.

Icon-Comment AdaHsu, 361 days ago. Icon-Permalink

Hi, Paulo:

Wow, I see the Traditional Chinese messages on this site.

Before my server was breakdown ( about 7 ~ 10 days will back online ), I had tried to build SnipIt rev.21 at Ubuntu 7.04, but the build process failed because something about sun's JPEG class ( for CAPTCHA purpose ) can't be found.

Does this class lib not saved in lib/ directory ?!

Icon-Comment pabrantes, 361 days ago. Icon-Permalink

Hey Ada,

Well I'm the one who has to thank you for the Traditional Chinese messages, it was your work! smiley Thanks!

Regardsing JCAPTCA I only placed the jcaptcha jar on lib because had no need for dependencies… but since you are refering a sun's class, you're not trying to compile against java 6 are you?
I'm asking because on java 6 sun changed the packages or their classes so you'll have a class not found error in certain cases regarding sun classes.

Icon-Comment AdaHsu, 361 days ago. Icon-Permalink

Hello Paulo,

Yes, Ubuntu installed a java 6 jdk version, you are right! After server online, I will try to downgrade jdk version, build again, run it standalone, and check for Configuration.get( String ) method!

Icon-Comment pabrantes, 360 days ago. Icon-Permalink

Glad I could help.

Ok Ada I'll be waiting for your feedback on that, thank you!

Icon-Comment AdaHsu, 346 days ago. Icon-Permalink

Hello Paulo:

I had tested snipit as jetty, and it still get a null value by Configuration.get( String ).

maybe something is wrong.

Icon-Comment pabrantes, 345 days ago. Icon-Permalink

Hey Ada,

That's strange, I have to re-check Configuration.get() method in order to see what can be going wrong.

Thanks for the feedback.

Icon-Comment AdaHsu, 345 days ago. Icon-Permalink

Do you have some documents about how to configure the new features about snipit like access control for each snip ?

Or, left some guides at Feature List there ?

Icon-Comment pabrantes, 340 days ago. Icon-Permalink

Hey Ada,

Sorry for the delay in the reply. There are no documentation yet, mostly because it isn't finished. But you can give a look into org.snipsnap.net.ChangeSnipPermissionsServlet and you'll understand how it works. No interface yet, only by creating yourself the URL.

I still have to look into the problem of Configuration.get() also…

Icon-Comment AdaHsu, 314 days ago. Icon-Permalink

Hi, Paulo !

Something maybe wrong...

If somebody want to make a registration on my blog, Tomcat will crashed and left a file on the root path. It caused by JCaptcha ( org.snipsnap.jcaptcha.JCaptchaServlet.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletRe sponse;)V+35 ).

My system is amd64, should JCaptcha only runs on x86 platform ?

Sorry, this case is JDK1.5's bug, I will try to fix it !

Please login to www.pabrantes.net.
Who am I?
paulo-roca2My name is Paulo Abrantes AKA pabrantes and I'm a software developer. I'm currently employed at >>CIIST working as a Java developer in >>FenixEDU.

This blog is mostly about Java programming, domain driven design and snipsnap bliki developing. Everything written in this blog is my personal opinion and it may not reflect the opinions of my employer and co-workers.


Blog subscription
subscribe by rss subscribe by email

Links
>> Home
>> Paulo's Profile
>> Post History
>> Add to Technorati Favorites
>> Paulo's Photo Gallery
>> WishList
>> Posting without Login

Search Blog
Fellow Bloggers

Recent Posts

Java Programming: Bytecode Injection
Intermission: Sorry For Downtime
Software Developing: Studying The Bliki Domain Model
SnipSnap Developing: Trying to settle a roadmap
System Administration: Load Balancing with Apache
Blogging: Two years have passed
Software Developing: The SnipSnap Saga
Java Programming: Getting your code spicy with Groovy
Software Developing: Fluent Interfaces
Software Developing: Implementing a ShoutBox on SnipsSnip
Software Developing: SnipSnap, SnipIt and SnipSnip
Java Programming: Proxies and Access Control
Java Programming: Proxies and References
Java Programming: References' Package
YALM: Yet Another Layout Modification

For older posts, please refer to post-history for a complete Post History

Logged in Users: (0)
… and 18 Guests.
This is a modified version of snipsnap.org created by >>Paulo Abrantes