Page 1 of 1

Code snippets and comments

Posted: Mon Aug 14, 2006 12:45 pm
by BrokenCitadel
Hi!

I have a couple of questions.
Is it possible to implement code snippets? Say for instance that i have a snippet of code that I use often e.g. an ActiveX fix for ie.
Could i then somehow make a button for it in the wysiwyg editor (the serendipity editor)? An if that is possible, how do i do that?

I looked into nuggets, but i don't want to implement it all the time.

And i would also like to remove comments and trackbacks completley. I.e the "Comments not allowed" text also.

I found a post on how to remove trackbacks here. Could someone make a similar example on how to remove comments please?? :roll:

Will flash and movie formats be implemented in the s9y 1.1 text and wysiwyg editors (with the activeX fix)?

apart from that s9y is awsome, great work guys.

Ps. Someone should make a complete tutorial on making themes for s9y so the rest of us can understand how tpl's and such work :wink:

Re: Code snippets and comments

Posted: Mon Aug 14, 2006 7:25 pm
by garvinhicking
Hi!

Yeah, you could modify the plugin "serendipity_event_emoticonchooser" or "serendipity_event_typesetbuttons". Both deal with showing custom icons in the Entry-section. You should be able to easily adapt that and either enhance the existing plugin, or create your own plugin based on that?

Or you could create your own "tags" which are replaced; the serendipity_event_regexpmarkup allows you to easily have a search+replace function.
And i would also like to remove comments and trackbacks completley. I.e the "Comments not allowed" text also.
That can be done with templating; have a look at the FAQ on www.s9y.org
Will flash and movie formats be implemented in the s9y 1.1 text and wysiwyg editors (with the activeX fix)?
The podcast plugin for example can embed flash/movie formats; apar
apart from that, you could also create your own tags like above.

If you know of any BSD-licensed Flash-Embedded player that we can use, I could easily enhance the podcast plugin to support that?
Ps. Someone should make a complete tutorial on making themes for s9y so the rest of us can understand how tpl's and such work :wink:
Carl Galloway has posted a lot of examples on his pages, have you looked at that?

Best regards,
Garvin

Posted: Mon Aug 14, 2006 8:02 pm
by judebert
I believe Carl Galloway has some very nice template tutorials. I heartily recommend his site.

To remove comments, go to your entries.tpl and remove everything between the {if $entry.has_comments} line and its matching {/if}. Also remove everything for {if $is_single_entry and not $is_preview} for serendipity_section_comments and its matching {/if}.

Posted: Mon Aug 14, 2006 11:13 pm
by BrokenCitadel
Ok, i know everyone comments on how quickly you guys reply around here and i thought, hmm.. Quick, guess that means two or three days wait.

But oh man, you are FAST! We're talking hours here. And that, ladies and geeks :wink: has confirmed it for me;

Serendipity really is THE tool.

So anyways, where was i... :roll: ...Oh yes, i was posting a reply!

Thanks for the help guys! It worked like a charm. And i'm actually starting to understand how to theme s9y. 8)

Posted: Tue Aug 15, 2006 9:38 am
by garvinhicking
Hi!

Awesome, thanks for the praise. :)

Hope you have fun using Serendipity. :-)

Best regards,
Garvin