Bundestagswahl 2009: Piratenpartei

Ohne zu sehr Politblogging zu betreiben... die Piraten sind ja eine Geschichte für sich. Wenn man einmal vom Namen absieht, denke ich, dass die relativ starke Konzentration auf wenige Themenkomplexe eine gute Sache ist und diese Themen theoretisch alle Bevölkerungsschichten ansprechen könnten bzw. sollten.
Die Wahrung des Grundgesetzes belegt dabei sicher den höchsten Stellenwert und fordert von den Piraten auch eine intensive Beschäftigung mit Themen außerhalb der IT, woran eine junge Partei ja nur wachsen kann.

Um jetzt nicht zu sehr abzuschweifen: Die Generation 40+ ist dabei wohl relativ schwierig zu erreichen und Spots, wie der folgende (der eindrucksvoll die Macht der Hintergrundmusik demonstriert), sind dazu ein Schritt in die richtige Richtung.

Bei der Bundestagswahl wird es den Sachsen allerdings nicht vergönnt sein, die Piratenpartei zu wählen (Infos dazu hier). Auch wenn Studentenregionen, wie Leipzig/Dresden/Chemnitz sicher noch ein paar Stimmen gebracht hätten. Mein Problem ist eher, dass die Kandidaten für die Landtagswahl keinen wirklich positiven Eindruck bei mir hinterlassen (jaja, bin halt ein oberflächlicher Mensch).

Jemand schon eine Ahnung, was zur Bundestagswahl gewählt wird? Links? Grün? Oder doch die BWLer Partei Deutschlands (BWLPD)? Ein ermäßigter Umsatzsteuersatz auf Haargel käme sicher vielen zu gute ;-)

*update*

Die Landtagswahlen sind ja nun vorbei (hoffe ihr wart alle fleißig wählen und habt meine fehlende Stimme ausgeglichen...)
Das Ergebnis ist nicht berauschend, aber dafür, dass die Piraten das erste mal angetreten sind, auch nicht schlecht. 1,9% sind es geworden. sie sind der Tierschutzpartei dicht auf den Fersen ;-)
Aber mal im Ernst: Wie kann nur jeder Zweite in diesem Land so verblendet sein und die Pseudochristen oder die SPD wählen. Von der NPD mit 5,6% brauch ich gar nicht erst anfangen...
Sei's drum. Ich lass' mir jetzt erstmal n schönes Steak im Garten schmecken :-)

*update2*

Eigentlich wollte ich noch ein paar Posts zu CDU, SPD, Grünen, ... diesem hier nachschieben. Aber mir liegt im Moment doch recht wenig an einer Politisierung dieses Blogs. Das ist eine recht mühselige Angelegenheit und nach dem Lesen meines letzten Comments hatte ich das Gefühl ein paar Mal aufspringen zu müssen und "BULLSHITBINGO!" zu rufen.
Den nachfolgenden Spot fand ich dennoch interessant und irgendwie erinnert er daran, wie weit sich die heutige SPD doch von ihren ursprünglichen Idealen entfernt hat. "Sozialismus" ist im aktuellen Sprachgebrauch ja zumindest etwas Extremes, was nur Radikale fordern können und eine rot-rote Koalition völlig undenkbar.

Und genau darum müsst ihr nun alle nach Hause laufen und euren Eltern sagen, dass sie gefälligst nicht die schwarze Pest wählen dürfen ;-)

*update3*

Die Wahl ist ja nun schon einige Tage her, aber ich möchte den Post nicht unabgeschlossen lassen und Ergebnisse anhängen. Ich war ja wieder mal nicht in der Lage meine stimme abzugeben, weil ich relativ spontan einen Kurzurlaub unternommen habe. Hätte am unschönen Wahlausgang aber wohl nichts geändert. Schwarz-Gelb (mit 33,8%/14,6%). Die nächsten 4 Jahre. Der Bundeswahlleiter hat auch noch ein paar interessante Grafiken zur Sache. Zum Beispiel über das Ost-West-Gefälle bei der Wahlbeteiligung oder die Verteilung der CDU-Wähler und die der LINKE-Wähler.
Ich wünsche uns allen natürlich viel Glück, dass der konservativ-liberale Mix nicht noch die Reste unseres Sozialsystems und Rechtsstaates abbaut und wir auch in ein oder zwei Jahren noch ein Fitzelchen Privatsphäre übrig haben.

Average (0 Votes)


Add Comment
Threaded Replies Author Date
Echt guter Spot, dessen Aussagen ich echt... Anonymous 9/3/09 7:55 PM
Ich kann dein Problem an der Stelle... dareu 9/6/09 1:18 AM
"Denn merke, Helmut ist der Bessere" :) ...ich... Anonymous 2/18/10 7:54 PM

Echt guter Spot, dessen Aussagen ich echt unterstützenswert finde. Hätte ich mehrere Stimmen würden die Piraten sicher eine abkriegen. Diese Themen warten schon lange darauf mal angesprochen zu werden.

Es gibt aber einen Punkt, der die Wahloption für mich sehr schwierig macht: Wähle ich Piraten so mache ich keinerlei Aussage zu Gesundheit, Wirtschaft, Arbeit, Umwelt und sozialer Gerechtigkeit. Diese Themen mögen sehr altbacken klingen, allerdings haben sie nichts von ihrerer Wichtigkeit verloren, schaut man sich die momentanen Verhältnisse in diesem Land an. Wähle ich Piraten ist es mir per Votum völlig gleich wieviel Gewinn Banken aus der Krise machen oder wie viele Kinder in Armut aufwachsen.

Das spricht nicht dagegen Piraten zu wählen. Allerdings muss man bei den o.g. Themen darauf vertrauen, dass der entsprechend gewählte Pirat nicht hier und dort mit der BWLPD sympathisiert - was natürlich überspitzt formuliert und keine Unterstellung sein soll :-).

... womit wir ja doch beim Politblogging wären ;-)
Posted on 9/3/09 7:55 PM.
dareu
Ich kann dein Problem an der Stelle hundertprozentig nachvollziehen. Es gibt in diesem Land im Moment einfach sehr viele Probleme zu lösen. Sowohl solche, die durch äußere Umstände entstanden sind, als auch solche, die direkte oder indirekte Folgen der bisherigen Missregierung sind. Und natürlich wählt man im Normalfall auch so, dass man davon überzeugt ist, dass die Probleme, die uns noch bevorstehen durch die Regierung in der nächsten Legislaturperiode bewältigt werden können.

Persönlich gehen mir für diese Anforderungen aber die Alternativen aus. Die SPD verliert massiv Wählerstimmen und der CDU ginge es dabei nicht besser, hätte sie keine so enorme Stammwählerschaft. Das signalisiert mir, dass die Bevölkerung unzufrieden mit der momentanen Situation ist. Nun ist der letzte Strohhalm, an den sich beide klammern natürlich Rot-Schwarz. Und so wird das die nächsten Legislaturperioden weitergehen, wenn den zwei großen Stimmen geschenkt werden, weil Wähler "ihre Stimme nicht an kleine Parteien verschwenden" wollen.

Vom Problem, dass wir Veränderung brauchen, nun zu den Piraten: Themenpartei. Völlig klar. Aber um ehrlich zu sein lebe ich persönlich den Ausspruch: Wer nichts zu sagen hat, hält am besten die Klappe. Eine Partei, die etwas von ihren Kernthemen versteht und ihren Idealen (wofür ich schließlich eine Partei wähle) treu bleibt, ist mir lieber, als ein inkompetenter Haufen von Heuchlern und Arroganten, die zu allem eine Meinung haben und auch Entscheidungen zu Problemen treffen wollen, bei denen sie mit Informationen völlig unterversorgt sind. Und wenn durch eine Handvoll Piraten in der Opposition auch nur ein Abgeordneter der regierenden Partei(en) eine richtigere Entscheidung im Plenum trifft, dann ist eine solche Partei ihrem Ziel ein ganzes Stück näher gerückt.

Die Piratenpartei lässt sich natürlich aufgrund des Namens sehr gut in eine Ecke manövrieren. Aber sie scheinen erkannt zu haben, dass wir in einer Informationsgesellschaft leben und das natürlich neue Probleme mit sich bringt. Und ihre Grundgesetzaffinität lässt sich nach den Vorkommnissen der letzten Zeit gut nachvollziehen. Dem BVerfG haben die Menschen in diesen Zeiten mehr Vertrauen geschenkt, als der demokratisch gewählten Regierung. Und ich sehe die Prinzipien eines Rechtsstaates bedroht, wenn wir anfangen Gesetze zu erlassen, die dazu führen, dass Menschen unter der scheinheiligen Behauptung, den Terror bekämpfen zu wollen, ihre Menschenrechte abgesprochen bekommen oder solche, die der Regierung eine mediale Zensur ermöglichen.

Die Piraten sind mit Sicherheit kein Allheilmittel (ich bin mir nicht mal sicher, ob sie für die Probleme ihrer Kernthemen ein Heilmittel sind), aber sie haben in letzter Zeit eine extrem schnelle Entwicklung durchgemacht. Die Menge an Themen, zu denen sie Stellung beziehen ist stetig gewachsen und bisher ist mir aufgefallen, dass das alles tendenziell in die richtige Richtung geht.

Und ich sehe meine Meinung aktuell durch keine Partei vertreten. Zur Bundestagswahl werde ich nicht verführt die Piraten zu wählen, weil sie hier nicht wählbar sind. Ich weiß nicht, ob das positiv ist, aber so habe ich eine Entscheidung weniger zu treffen ;-)
Den aktuellen gesamteuropäischen Rechtsrutsch, der schon nach der Europawahl abzusehen war, werde ich allerdings mit Sicherheit nicht unterstützen. Demagogen haben hierzulande eine lange Tradition, aber mir wäre es lieber, wenn die Neofaschisten keine Regierung stellen.
Posted on 9/6/09 1:18 AM in reply to .
"Denn merke, Helmut ist der Bessere" emoticon
...ich glaub mein Schwein pfeift, wenn das mal nicht Dieter Hildeband ist. - Hatte dein letztes Update damals gar nicht mitgekriegt.
Jetzt also mein letzter Kommentar zum Thema Politik:
Makaber, dass sich - entgegengesetzt zu diesem Spot - sich die SPD erst Jahre vorher in Godesberg vom Sozialismus verabschiedet hat um nach 16 Jahren BRD endlich auch mal (auch mit bürgerlichen Stimmen) in die Regierung gewählt zu werden. Dass es unter Brand dann trotzdem zu sozialen Errungenschaften wie dem Bafög kam und sich das Verhältnis zu den sozialistischen Ländern entspannt hat zeigt, dass (wie man auch an dem Spot sehen kann) in der Politik das was man sagt und was man tut nicht zwingender Weise zusammengehört. So war - als Gegenbeispiel - die SPD unter Schröder mit Sozialabbau und Merkel mit dessen teilweisen Rücknahme beschäftigt. Es lohnt sich also zu schauen, was die ein oder andere Partei tut, während gerade NICHT Wahlkampf ist und dann rechtzeitig zum Wahlkapf wegzuzappen.

eine gewisse Verlässlichkeit zeigt letzten Ende jedoch die folgende Grafik:
http://www1.bpb.de/wissen/W9TRAS,0,0,BAf%F6G.html
...würde man immer zum Regierungswechsel eine Trennlinie einziehen, lassen dich recht leicht Tendenzen erkennen. emoticon

Besten Gruß,
Christian
Posted on 2/18/10 7:54 PM.

Dynamically loading SyntaxHighlighter modules

If you're into publishing code on web pages, chances are that you might already know SyntaxHighlighter by Alex Gorbatchev. The idea of highlighting code at the client really is a good one. But until today I felt that adding even more JavaScript to this site might just be too much considering that I wouldn't need the syntax highlighting on every page and much less for every programming language. So why not load it dynamically?
My approach at this was to use jQuery and a regular expression to detect if syntax highlighting is needed and which programming languages are used. It supports SyntaxHighlighter 2.0's feature of embedded XML in other languages and loads the XML brush accordingly.

All you have to do is to adjust the path to the SyntaxHighlighter scripts und include it in your page. Stylesheets are NOT loaded automatically. It wouldn't be a problem, though. Perhaps in a future version. *update*: No sooner said than done! Stylesheets will now be loaded asynchronously, too. So, no need to include them in your page headers anymore!


/* simbaba.net */
jQuery(function() {
	var shRoot='/html/js/syntaxhighlighter/';
	var theme="shThemeSimbaba.css";

	var brushes=[];
	jQuery("pre").each(function() {
		brushName=/brush:\s?(\w+);?/i.exec(this.className);
		if(brushName==null) {
			return true;
		} else {
			if(/html-script:\s?true;?/i.test(this.className)
				&& jQuery.inArray("xml",brushes)<0) brushes[brushes.length]="xml";
			brushName=brushName[1];
			if(jQuery.inArray(brushName,brushes)<0) brushes[brushes.length]=brushName;
		}
	});

	brusheslen=brushes.length;
	if(brusheslen>0) {
		jQuery.each(["shCore.css", theme], function() {
			jQuery.get(shRoot+"styles/"+String(this), function(c) {
				jQuery("head").append("");
			});
		});
		jQuery.getScript(shRoot+'scripts/shCore.js', function() {
			sh=SyntaxHighlighter;
			SyntaxHighlighter.config.clipboardSwf = shRoot+'scripts/clipboard.swf';
			jQuery.each(brushes, function() {
				file=null;
				switch(String(this)) {
					case "xml": case "xhtml": file='shBrushXml.js'; break;
					case 'actionscript3': case 'as3': file='shBrushAS3.js'; break;
					case 'bash': case 'shell': file='shBrushBash.js'; break;
					case 'c#': case 'c-sharp': case 'csharp': file='shBrushCSharp.js'; break;
					case 'css': file='shBrushCss.js'; break;
					case 'delphi': case 'pascal': file='shBrushDelphi.js'; break;
					case 'diff': case 'patch': file='shBrushDiff.js'; break;
					case 'groovy': file='shBrushGroovy.js'; break;
					case 'js': case 'jscript': case 'javascript': file='shBrushJScript.js'; break;
					case 'java': file='shBrushJava.js'; break;
					case 'jfx': case 'javafx': file='shBrushJavaFX.js'; break;
					case 'perl': case 'Perl': case 'pl': file='shBrushPerl.js'; break;
					case 'php': file='shBrushPhp.js'; break;
					case 'powershell': case 'ps': file='shBrushPowerShell.js'; break;
					case 'py': case 'python': file='shBrushPython.js'; break;
					case 'ruby': case 'rails': case 'ror': file='shBrushRuby.js'; break;
					case 'scala': file='shBrushScala.js'; break;
					case 'sql': file='shBrushSql.js'; break;
					case 'vb': case 'vbnet': file='shBrushVb.js'; break;
					default: brusheslen--;
				}
				if(file!=null)
					jQuery.getScript(shRoot+"scripts/"+file, function() {
						brusheslen--;
						if(brusheslen==0)
							SyntaxHighlighter.highlight({
								'wrap-lines':false,
								'smart-tabs':false
							});
					});
			});
		});
	}
});

Feel free to use this script in any way you want, but I'd be really happy if you would drop me a line if it was of any help :-)

Average (0 Votes)


Add Comment
Threaded Replies Author Date
Hi Simba Like the blog! I'm working on my own... garry.donnelly 4/18/10 2:05 AM
Hey Garry! I suppose you saw that my activities... dareu 4/19/10 12:23 AM

garry.donnelly
Hi Simba

Like the blog! I'm working on my own Liferay install and setup. Haven't got a theme put together yet. I'll have to work on that next. I was wondering if you had much trouble integrating this and jQuery into Liferay? I'll probably be posting a good bit of code and this looks great to me.

-Garry
www.greatwhiteit.com
Posted on 4/18/10 2:05 AM.
dareu
Hey Garry!
I suppose you saw that my activities regarding development and maintenance slowed down a bit recently.
I'm still a big supporter of Liferay and at the moment I am evaluating the 6.0 preview with the plan in mind to update the site as soon as my limited time allows that. Web applications written in Java are and probably always will be state-of-the-art for me.

I always found it really nice that Liferay itself decided to go with jQuery. And I have to admit that I'm a little bit sceptical as to why they're pulling back now and are removing some dependencies to jQuery in 6.0.
But in 5.2 you definetely don't have to do anything to include jQuery support. Adding this script to the portlets you want the SyntaxHighlighter support in really is all there is to it.

Have a lot of fun with your new Liferay site and make sure to post more on your progress with it within your blog (or here!). I'm sure there will also be some posts on simbaba.net regarding my migration to Liferay 6.0 soon.
Looking forward to hearing from you,
Simba
Posted on 4/19/10 12:23 AM in reply to garry.donnelly.

Liferay 5.2 and anonymous blog comments

Liferay doesn't support comments by the guest user off the shelf. Let's see how we can change that...

We'll begin with changing the code in com.liferay.portlet.messageboards.service.impl.MBMessageServiceImpl to prevent it from throwing unwanted exceptions. We just need to edit one method:

public MBMessage addDiscussionMessage(
		String className, long classPK, long threadId, long parentMessageId,
		String subject, String body, ServiceContext serviceContext)
	throws PortalException, SystemException {

	User user;
	try {
		user = getUser();
	} catch (PrincipalException pe) {
		user = UserLocalServiceUtil.getDefaultUser(CompanyThreadLocal.getCompanyId());
	}

	MBDiscussionPermission.check(
		getPermissionChecker(), user.getCompanyId(),
		serviceContext.getScopeGroupId(), className, classPK,
		user.getUserId(), ActionKeys.ADD_DISCUSSION);

	return mbMessageLocalService.addDiscussionMessage(
		getGuestOrUserId(), null, className, classPK, threadId, parentMessageId,
		subject, body, serviceContext);
}

 Be sure to allow permissions to be given to the guest user by modifying ext-impl/src/resource-actions/blogs.xml:

<resource-action-mapping>
	<!-- ... -->
	<model-resource>
		<!-- ... -->
		<guest-defaults>
			<action-key>VIEW</action-key>
			<action-key>ADD_DISCUSSION</action-key>
		</guest-defaults>
		<guest-unsupported>
			<action-key>DELETE</action-key>
			<action-key>DELETE_DISCUSSION</action-key>
			<action-key>PERMISSIONS</action-key>
			<action-key>UPDATE</action-key>
			<action-key>UPDATE_DISCUSSION</action-key>
		</guest-unsupported>
	</model-resource>
</resource-action-mapping>

When building the ext environment check that the XMLs within the resource-actions directory actually get copied.
There you go! Now we have just one more litte problem: spammers. To circumenvent them we'll use the Captcha tag and a few lines of code. Look at ext-web/docroot/html/taglib/ui/discussion/page.jsp. You'll notice 2 places where the user is supposed to enter his comment. Each one of them has a textarea with the following declaration:

<textarea id="<%= namespace %>postReplyBody<%= i %>" name="<%= namespace %>postReplyBody<%= i %>" style="height: <%= ModelHintsConstants.TEXTAREA_DISPLAY_HEIGHT %>px; width: <%= ModelHintsConstants.TEXTAREA_DISPLAY_WIDTH %>px;" wrap="soft" onKeyUp="document.<%= formName %>.<%= namespace %>postReplyButton<%= i %>.disabled = (this.value == '');"></textarea>

Directly below them add these lines:

<c:if test="<%= PortalUtil.getUser(request)==null %>">
	<liferay-ui:captcha url="" />
</c:if>

This will make sure that logged in users won't be bothered by the Captcha. The empty URL attribute is a workaround for a problem one of my readers pointed out. If you want to know, why I do the hack with the invisible image, see here. Additionally you'll want to show an error message in case the user enters the wrong number. Add this line directly below the starting <form> tag:

<liferay-ui:error exception="<%= CaptchaTextException.class %>" message="text-verification-failed" />
<portlet:actionURL var="captchaURL" windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>"><portlet:param name="struts_action" value="/message_boards/captcha" /></portlet:actionURL>
        
<div style="display: none;"><img src="<%= captchaURL %>" onload="<%= namespace %>initCaptcha(this.src);"/></div>
<input name="<%= namespace %>captchaText" type="hidden" value="" />

Complement com.liferay.portlet.messageboards.action.EditDiscussionAction with the actual check of the Captcha. Search for the "Add message" comment and replace it with

// Add message

User user = PortalUtil.getUser(actionRequest);
if(user==null) CaptchaUtil.check(actionRequest);

Redirect the CaptchaException to the actual page by replacing line 97 with

else if (e instanceof CaptchaTextException ||
	e instanceof FileNameException ||

If you have a better solution or questions about this one, don't hesitate to ask.

*update*

It turned out that the first version had a major flaw when it came to posting a reply to previously left comments (thanks for pointing that out!)
Therefore I modified the original post (especially the part with the Captcha tag). It's an ugly workaround but I didn't want to modify a whole lot from the original Liferay code.
Additonally you have to insert a little more JavaScript (which is fine because blog comments won't work without it, anyway).

The code will assure that every Captcha input field has a unique name attribute. After that the postReply function should look like this:

function <%= namespace %>postReply(i) {
	eval("var parentMessageId = document.<%= formName %>.<%= namespace %>parentMessageId" + i + ".value;");
	eval("var body = document.<%= formName %>.<%= namespace %>postReplyBody" + i + ".value;");
	eval("var captcha = document.<%= formName %>.<%= namespace %>captchaText" + i + ";");

	document.<%= formName %>.<%= namespace %><%= Constants.CMD %>.value = "<%= Constants.ADD %>";
	document.<%= formName %>.<%= namespace %>parentMessageId.value = parentMessageId;
	document.<%= formName %>.<%= namespace %>body.value = body;
	document.<%= formName %>.<%= namespace %>captchaText.value = captcha==null?"":captcha.value;
	submitForm(document.<%= formName %>);
}

Hope that helps.

*update2*

I hate Microsoft browsers. Especially if their version number is lower than 7. Nobody should ever be forced to develop for them and if you are: tell your cleints you want extra money for it.

I edited the original post and the first update. Sorry for that but it was easier than describing what exactly I changed. Additionally, beneath the postReply function add this:

function <%= namespace %>initCaptcha(src) {
	if(!window.captchaImgSrc || src) {
		if(src) window.captchaImgSrc=src;
		else setTimeout("<%= namespace %>initCaptcha()", 250);
		return;
	}
		
	jQuery("form[name=<%= formName %>] .captcha").attr("src", window.captchaImgSrc);
	jQuery("form[name=<%= formName %>] .taglib-captcha input[name=<%= namespace %>captchaText]")
		.each(function(i) {
			jQuery(this)
				.attr("name",this.name+i).keypress(function(e) {if(e.which==13) {<%= namespace %>postReply(i);}});
			if(Liferay.Browser.isIe() && Liferay.Browser.getMajorVersion()<7)
				jQuery(this).replaceWith(jQuery('<input name="'+this.name+'"/>').replaceWith(jQuery(this).clone()));
		});
}

If you want to know why I used the IE<7 statement, head over here. And directly before the very last </c:if> statement (last line in file) add this:

<script type="text/javascript">
	<%= namespace %>initCaptcha();
</script>

You'll wonder why I didn't just use jQuery(document).ready(). The answer is that IE6 doesn't like it. Don't ask why - I don't know the reason. The only thing I know is that I wasted hours on this one.

I tested it on IE6/8, Firefox, Opera and Safari. For me it worked but I would be really happy if you would drop me a line if there are still problems. Sorry again for all the hassle.

*update3*

I just got one of those "text verification failed" errors. It was just one time and I can't reproduce it. If someone has time to investigate on this further then I'd be really thankful if you could give me a hint as to where my mistake lies (perhaps the numbering of the captcha textfields?). And it wouldn't bother me if you'd have to spam on my site to find something suspicious ;)

On another note I saw some warnings within the Liferay log saying that "The struts path message_boards does not belong to portlet 33. Check the definition in liferay-portlet.xml".
Add this to your ext-web/docroot/WEB-INF/struts-config.xml to fix it:

<action path="/blogs/captcha" type="com.liferay.portal.captcha.CaptchaPortletAction" />

And don't forget to change the Struts action parameter for the captchaURL variable.

Average (0 Votes)


Add Comment
Threaded Replies Author Date
Thanks much for posting this! One thing, I... Anonymous 8/20/09 6:30 AM
You're welcome! And you're right this doesn't... dareu 8/20/09 4:10 PM
Lovely! I will have to try this out myself. The... Anonymous 9/3/09 11:14 PM
Afraid it's not working as expected. I (and my... Anonymous 9/17/09 2:17 AM
Sorry it didn't work for you. When I had to... dareu 9/18/09 11:35 AM
Thanks! I'm using Firefox 3.5.2 when testing... Anonymous 9/18/09 2:36 PM
Sorry, I'm on vacation till thursday. So I'm... dareu 10/16/09 9:58 PM
I'm going to disable the captchas for some days... dareu 10/30/09 1:02 AM
Hi Simba, Any update, how can we see captcha... Anonymous 11/26/09 5:09 PM
It's just that I have no spare time to... dareu 11/26/09 5:43 PM
aaa Anonymous 10/6/11 10:56 AM
123 Anonymous 11/11/09 4:25 PM
HI Simba, Thanks for the nice article. I am... Anonymous 11/26/09 5:13 PM
@GD: I don't know exactly what you mean, but if... dareu 11/26/09 5:54 PM
Let me clarify the question: In your blog you... Anonymous 11/26/09 6:11 PM
222 Anonymous 12/14/09 11:49 AM
heeey hi... i have to do this, the anonymous... Anonymous 4/30/10 7:05 PM
hi im wondering if u could send me the... Anonymous 4/30/10 11:59 PM
hola Anonymous 6/3/10 10:47 PM
thank Anonymous 6/24/10 5:50 AM
Thanks a lot for a lovely tutorial. Anonymous 9/15/10 9:46 AM
Thanks :) Anonymous 12/5/10 2:32 PM
... Anonymous 3/4/11 6:34 PM
I will try Anonymous 11/15/10 9:56 PM
He intentado añadir esta funcionalidad al visor... Anonymous 3/1/11 1:11 PM
Sorry, in Encglish: I've tried to add this... Anonymous 3/1/11 1:18 PM
I got it, thans for the tutorial!!! Anonymous 3/1/11 4:54 PM
I didn't even had a chance to answer your... dareu 3/1/11 7:06 PM
prueba Anonymous 4/21/11 6:04 PM
Prueba de que funciona tu aportacion Anonymous 4/21/11 6:05 PM
Test Anonymous 8/29/11 3:48 PM
Test dareu 9/5/11 4:01 PM
lsdkjfldskjf Anonymous 10/1/11 12:05 PM
Hello, thank you for this great tutorial, I... Anonymous 10/19/11 7:00 PM
Hi! As far as I know the location of... dareu 10/21/11 10:03 AM
good Anonymous 6/7/12 4:28 AM
gfgaa Anonymous 7/24/12 1:12 PM

Thanks much for posting this!

One thing, I couldn't make captchas work for replies to previous comments. Any ideas?

Cheers!
Posted on 8/20/09 6:30 AM.
dareu
You're welcome!

And you're right this doesn't work as excepted. It's because all the Captcha input fields are within one form and the browser only sends the first one, whereas the user session contains the value of one of the other Captcha requests.
I'm currently having a look at it and will update the post later with (hopefully) a less flawed version.

Sorry!
Posted on 8/20/09 4:10 PM in reply to .
Lovely! I will have to try this out myself.
The clear instructions together with your reasoning behind what you did and why is really helpful.

Looking forward to seeing more Liferay tweaks from you!
Posted on 9/3/09 11:14 PM in reply to simba.
Afraid it's not working as expected. I (and my visitors) get "Text verification failed." errors even if the captcha text is correctly submitted. As a matter of fact it happened just a second ago when I tried to submit this comment the first time!

I would be thrilled if you could have another look at your solution.

Many thanks!
Posted on 9/17/09 2:17 AM in reply to simba.
dareu
Sorry it didn't work for you.
When I had to guess I'd say that the browser is issuing multiple requests for the captcha images.

Could you tell me what browsers you and your visitors use?

*edit* I can confirm that it isn't working in IE6 because it has 2 major flaws:
a) it issues one request per src attribute that is set via JavaScript.
(see http://support.microsoft.com/default.aspx?scid=kb;en-us;319546)
This is easily fixable and I've worked around this already.
b) I couldn't make it change any of the name attributes at runtime. It seems to be read-only.
(see http://msdn.microsoft.com/en-us/library/ms534184%28VS.85%29.aspx)
Which is bad because I'd have to change even more core code or do ugly workarounds.

Either way, I'll post a (poor) solution later...
Posted on 9/18/09 11:35 AM in reply to .
Thanks!
I'm using Firefox 3.5.2 when testing this. Many of our blog readers are experiencing the problem but unfortunately I don't know what browsers they are using, other than the statistics which tell us we have the usual mix of IE (49%), Firefox (40%) and Safari (8%) plus a few others.

Cheers!
Posted on 9/18/09 2:36 PM in reply to simba.
dareu
Sorry, I'm on vacation till thursday. So I'm not going to get to work on a solution until the end of the week.

*edit* Well vacation took longer as expected - which is fine with me ;-).
I just wanted to let you know that implementing a solution is still on my to-do list.
*edit2* I'm really sorry for the delay but life doesn't make it easy for me to catchup with the things I would like to do. I guess that's how it'll always be.
Posted on 10/16/09 9:58 PM in reply to .
dareu
I'm going to disable the captchas for some days because I'm interested in how bad the situations with spammers really is.
Posted on 10/30/09 1:02 AM in reply to simba.
Posted on 11/11/09 4:25 PM.
Hi Simba,

Any update, how can we see captcha and work captcha with reply too.
It seems we can have only one captcha in one form and LR discussion board tag library has been written so that all post will come inder one form.

I am stuck due to this. If you have any solution please update me.

Cheers.
Posted on 11/26/09 5:09 PM in reply to simba.
HI Simba,

Thanks for the nice article. I am also implementing the anonymous comment for journal article. But when I cofigured the journal.xml and changed the action key for ADD_DISCUSSION journalarticle model, its still not updating the ADD_DISCUSSION in permission portlet.

Any clue for it?

Thanks in advance for your help.
GD
Posted on 11/26/09 5:13 PM.
dareu
It's just that I have no spare time to investigate this further. Real life is picking on me, at least for the moment.

The code in this post seems to work only most of the time (for me). Perhaps it's because of the JS numbering the text fields wrong. But that's just wild guessing.

It should work as follows:
The JavaScript logic (within the JSP) should add a number to all the name attributes of the captcha text input tags. So that when clicking the submit button the postReply function knows which value to send to the server. And because the current implementation of the captcha only allows one value to be stored in the user session we have to find a way to force the browser to request the image only ONE time. Which seems to work with the above code (even for IE6 - at least for me).

I'm really so sorry that this whole post is kind of useless because there're bugs in the implementation. The thing is I started programming this with having in mind that a wanted to change the core LR code as little as possible. Maybe this was the wrong tactic.
Posted on 11/26/09 5:43 PM in reply to .
dareu
@GD: I don't know exactly what you mean, but if you're programming within the ext environment then there is a chance that you're encountering a bug in the build script. Add a copy statement to ext-impl/build-parent.xml: <copy todir="classes/resource-actions"><fileset dir="src/resource-actions" /></copy>

If you're trying to change the default permissions then you may have to change some Java code to include setting the guest permission (but don't quote me on that, I haven't done that yet).

Sorry, if I misunderstood you (be sure to let me know!).
Posted on 11/26/09 5:54 PM in reply to .
Let me clarify the question:
In your blog you have written that
"Be sure to allow permissions to be given to the guest user by modifying ext-impl/src/resource-actions/blogs.xml:"
I did with blogs.xml, it worked there. I am able to see that guest can now add comment to blogs.
Same way I tried for journal article in journal.xml, but it did not allow permissions for guest.
Posted on 11/26/09 6:11 PM in reply to simba.
Posted on 12/14/09 11:49 AM.
heeey hi... i have to do this, the anonymous comments and i have a question... when u set this and works... is there a way to choose if u want to comment as anonymous, something like a checkbox like the message boards portlet??? ....
Posted on 4/30/10 7:05 PM.
hi

im wondering if u could send me the modyfied classes , because im having trouble when i debug'em...
Posted on 4/30/10 11:59 PM.
Posted on 6/3/10 10:47 PM in reply to .
Posted on 6/24/10 5:50 AM.
Thanks a lot for a lovely tutorial.
Posted on 9/15/10 9:46 AM.
Posted on 11/15/10 9:56 PM.
Posted on 12/5/10 2:32 PM in reply to .
He intentado añadir esta funcionalidad al visor de contenido web y al introducir el comentario y el captcha y pulsar en Responder me sigue saliendo el mensaje de error "Lo siento, no tiene los permisos necesarios."

¿Alguna pista de que he hecho mal?
Posted on 3/1/11 1:11 PM.
Sorry, in Encglish:

I've tried to add this functionality to the Web Content Display portlet but I am still gettin the "You do not have the required permissions." when I click reply after introducing my comment and the captcha.

Some clue about what did I do wrong?

Thanks a lot!
Posted on 3/1/11 1:18 PM in reply to .
I got it, thans for the tutorial!!!
Posted on 3/1/11 4:54 PM in reply to .
dareu
I didn't even had a chance to answer your question.
But it's great to hear you got it working emoticon

Apart from that I have to admit that the captcha solution posted above might be a little buggy. So please make sure to check that before actually using it.
Posted on 3/1/11 7:06 PM in reply to .
Posted on 3/4/11 6:34 PM in reply to .
Posted on 4/21/11 6:04 PM.
Prueba de que funciona tu aportacion
Posted on 4/21/11 6:05 PM.
Posted on 8/29/11 3:48 PM.
Posted on 9/5/11 4:01 PM in reply to .
Posted on 10/1/11 12:05 PM.
Posted on 10/6/11 10:56 AM in reply to .
Hello, thank you for this great tutorial, I only wish i could use it... i'm very noob in liferay and java

im stuck in the first line where it says:
We'll begin with changing the code com.liferay.portlet.messageboards.service.impl.MBMessageServiceImpl

I cant find MBMessageServiceImpl.java
Posted on 10/19/11 7:00 PM.
dareu
Hi!

As far as I know the location of MBMessageServiceImpl didn't change in 6.0, so it should still be in that very package (you can find it in portal-impl). Please make sure to not modify the source directly, though.

As for this tutorial in general, it is pretty outdated actually... and it will be useless once Liferay 6.1 ships (which is in Q4 2011). You will be able to post as a guest user there OOTB.

Regards,
Daniel
Posted on 10/21/11 10:03 AM in reply to .
Posted on 6/7/12 4:28 AM.
Posted on 7/24/12 1:12 PM.

simbaba.net goes Java

Nur eine kurze Wortmeldung meinerseits... ich habe die Test- und Betaphase in der Softwareentwicklung übersprungen und heute die neue Seite online genommen.

Ich setze jetzt voll auf Java als Backend, das heißt Tomcat mit entsprechendem Portlet-Container... ich werde darauf aber später nochmal genauer eingehen. Ich brauche euch wohl nicht erzählen, wie weh es tut, wenn man Quellcode aufgeben muss, an dem man Monate, wenn nicht Jahre, geschrieben hat; aber es war einfach Zeit für einen Bruch. PHP ist in meinen Augen gut für kleine Projekte, aber sobald man damit ein CMS angehen will, kommt am Ende Spaghetti-Code raus. Habe mir z.B. Drupal näher angeguckt und musste eben diese Erfahrung wieder machen.
Die Oberfläche ist quasi gleich geblieben, gewohnt hässlich eben. Hätte ich auch nur ein bisschen mehr grafisches Talent würde das wohl anders aussehen. Falls sich natürlich jemand befähigt fühlt... ;-)

Falls es Probleme mit Mails geben sollte, bitte melden! Der Mail-Server ist jetzt sehr viel komplizierter und ich bin noch nicht sicher, ob die Konfiguration 100%-ig passt. Habe mich von XMail verabschiedet - auch wenn er mir treue dienste geleistet hat - und hab' den Dovecot-Postfix-Weg eingeschlagen.

Und weil jetzt alles so doll ist, hoffe ich, dass ich mich öfter dazu durchringen kann zu bloggen :-)

Also bis bald und au revoir,
Simba

*update*

Unter dem Motto "Let's go Java" habe ich auch den Jabber-Server wiederbelebt. Openfire heißt er, ist vollständig in Java geschrieben und wirklich ein sehr schönes Stück Software.
Also einfach euren Lieblings-Messenger (Pidgin, Trillian, Miranda, ...) auf den Server simbaba.net einstellen und mit euren normalen Anmeldedaten einloggen. :)

Average (0 Votes)


Add Comment
Threaded Replies Author Date
Gleich 2 Posts innerhalb von 2 Tagen, das lässt... Anonymous 8/5/09 12:23 AM
Hab' dir grad n neues PW geschickt... Das mit... dareu 8/5/09 11:56 AM

Gleich 2 Posts innerhalb von 2 Tagen, das lässt doch hoffen :-). Von hässlich kann hier allerdings keine Rede sein. Finde deine Seite hat definitiv ihren eigenen Stil.
Leider ist mein letzter Login solange her, dass ich anonym posten muss. Kann auch mein PW nirgends mehr auftreiben. Vieleicht gibts da ja ne Möglichkeit ... ;-)

Christian L.
Posted on 8/5/09 12:23 AM.
dareu
Hab' dir grad n neues PW geschickt...
Das mit dem Design war mein heimtückischer Plan: es einfach solang gleich aussehen zu lassen, bis man es als "eigenen Stil" wahrnimmt ;-) Bei craigslist.com hat's schließlich auch funktioniert.

Würde eigentlich auch mehr privates Zeug hier posten, aber mein Leben ist einfach zu langweilig :-)
Posted on 8/5/09 11:56 AM in reply to .

Alles Gute nachträglich...

...oder so ähnlich muss es wohl heißen, denn 2 Jahre ist es nun her, dass ich hier die erste News gepostet hab.
Aber da wir in einer stressigen Zeit leben, bleibt nicht mal groß Zeit zum Gratulieren - und das, obwohl ich in letzter Zeit so schon wenig an der Seite gemacht habe.
Nachdems am Wochenende ein konspiratives Treffen gab und die Seite schon lang keine Neuerungen mehr erfahren hat - gibt's hoffentlich bald ein Revival mit neuen Features, Bugfixes und anderem Gedöhns. Ein cron-Job kümmert sich jetzt auch ums Logging, sodass ich Probleme wohl jetzt besser analysieren kann, falls ich mal wieder offline bin (sorry nochmal, hoffe, das läuft jetzt wieder...).
Hab' PHP installiert und Netbeans eingerichtet und die ersten neuen Zeilen Code geschrieben.
Da ich jetzt so JSP-Verwöhnt bin, fühlt sich PHP wieder wie ein Rückschritt an, aber meinem Router kann ich schließlich keine JVM zumuten ;)
Normalerweise gehört zu so einem Geburtstagsposting ja auch ein sentimentaler Rückblick auf damalige Verhältnisse, aber das erspar' ich euch und mir und verabschiede mich lieber in gewohnt lieblicher Stimmlage: Schlafet alle fein, man sieht sich :)

Average (0 Votes)


Add Comment
Threaded Replies Author Date
Glückwunsch... endlich mal wieder News (groß... aufspringer 12/27/08 10:38 PM
da ich mein PW vergessen hab, weil ichs ja so... ludwisch 2/15/09 10:36 PM
Ohje... ich schäme mich. Wirklich. Hoffentlich... dareu 2/15/09 10:46 PM
Oh Mann, bei der Eingangsszene zu... ludwisch 7/17/09 9:23 AM
Ich danke dir ;) Der Vollständigkeit halber... dareu 7/29/09 4:12 PM

ludwisch
da ich mein PW vergessen hab, weil ichs ja so selten brauch (mehr action auf der hp!) muss ichs wohl als Gast schreiben (zum 2. mal weil beim ersten mal dein Server nix von mir wissen wollte:

echt nettes desing, suuuuuuuuper, kann sich sehn lassen!

viele grüße
Posted on 2/15/09 10:36 PM.
dareu
Ohje... ich schäme mich. Wirklich. Hoffentlich war das nur ne Ausnahme, dass die Comments nicht funktionieren.
(ich hab noch aus 56k-Zeiten die Angewohnheit vorher Strg+C zu drücken ;))

Aber danke für das Lob emoticon
Schlechte Nachricht zum Design ist allerdings, dass es sich Techniken zu nutze macht, die der IE6 nicht beherrscht, das Gute ist, im IE7 funktioniert jetzt alles (im Gegensatz zum vorherigen Design).
Hat sich auch viel im Hintergrund geändert (Stichwort: &quot;Objektorientiertes PHP&quot).
Im Moment bin ich aktiv daran, mich nach einem neuen Server umzusehen. Wobei es 2 Optionen gibt: einen zu Mieten (etwa 9€/Monat, z.B. bei server4you.de) oder den zu Hause aufzustellen (kenn da jemanden mit DSL16000 ;)), Kostenpunkt etwa 100€ Anschaffung + 25W Stromverbrauch.

Wenn ich dann mehr Power hab, wäre vielleicht sogar ein echtes CMS sinnvoll (dachte über Wordpress oder Drupal nach - Nachteil an der Geschichte ist halt, dass ich meinen ganzen Eigenentwicklungen nachtrauern werde). Dann kommt hoffentlich auch n bisschen mehr Leben in die Bude ;)
Posted on 2/15/09 10:46 PM.
ludwisch
Oh Mann, bei der Eingangsszene zu http://www.eos-media.com/content/moviemaker/player/player.swf?ID=9902&amp;KEYP=tqsrmyfkgfbqsaci hab ich mich krass weghauen müssen... :-D
Auf alle Fälle ein heißer Kandidat für den besten Kurzfilm nächsten Juni in Cannes.
Posted on 7/17/09 9:23 AM.

© 2006-2015 simbaba.net