Code snippets and comments

Discussion corner for Developers of Serendipity.
Post Reply
BrokenCitadel
Posts: 2
Joined: Thu Aug 10, 2006 1:17 pm

Code snippets and comments

Post 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:
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Code snippets and comments

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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}.
Judebert
---
Website | Wishlist | PayPal
BrokenCitadel
Posts: 2
Joined: Thu Aug 10, 2006 1:17 pm

Post 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)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Awesome, thanks for the praise. :)

Hope you have fun using Serendipity. :-)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply