some probable useful request

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
zman
Posts: 2
Joined: Wed Aug 30, 2006 1:18 pm

some probable useful request

Post by zman »

Dear Garvinhicking,


In the course of using and exploring your blog, I’ve come up with a number of questions and proposals. I think they could a bit simplify and improve functionality and convenience of this undoubtedly qualitative product.

1. How the code page ru.cp-1251 can be supported?
In my case Russian language can be used correctly only in UTF8 format
(Serendipity 1.1-beta5, PHP 4.4.4, MySQL 4.1.16-max, Apache 1.3.33 Win32)

As I’m not a native speaker, let me raise some of my questions by the example of a car -related web-site:

2. Is it possible to make a little improvement (probably in the form of plug-in) by adding numerical value to the category? For example - the cost of the car or object location (or latitude and longitude).

3. Which plug-in can make a form with data input restriction?
For example – restricting the data input by using a definite number of fields.
Example: the field of car run – only digitals, the comments field – up to 50 symbols.

4. At the moment, the category tree (Serendipity Administration Suite, New Entry, Category) looks in the following way:

categories
|
|
--- engine
| |
| |
| --- 4 cylinders, 5, 6, 8, diesel
|
|
--- body
| |
| |
| --- coupe, sedan, hatchback, cabriolet, targa
|
--- state
| |
| |
| --- perfect, good, average, broken
|
--- price
| |
| |
| --- (meaning)
|
etc ...

I’d like to make more convenient structure of categories menu, which provides an opportunity to dislocate the root (beginning) of the categories inside, i.e. instead of one hyper-large category to use several smaller menus, in particular:

engine
|
|
--- 4 cylinders, 5, 6, 8, diesel

body
|
|
--- coupe, sedan, hatchback, cabriolet, targa

state
|
|
--- perfect, good, average, broken

In other words, the internal subcategories (engine, body, state) are displayed when filling in the news (some text about car).

5. Is it possible to make a search of the car with a range of several categories?
The car examples: body, state, year of issue, price?

6. When making the news suggesting by anonymous (not logged-in) user, is it possible that the signature of this user’s news would be state anonymus - not the name of a moderator who publishes this news?

7. How to make the pictures loading and pictures linking to the news as simple as possible?

I propose the following way:
- we’re using a simple plug-in with addition button “add picture” located on the standard news adding page (Serendipity Administration Suite - New Entry)
- when pushing the button “add picture”, we choose the file with a picture
- when filling the first field with a number of the loading picture, it is possible to add one more picture (the quantity of the adding pictures is customized in plug-in options, for instance from 0 to 3)
The processing of the received pictures is made by type, size, picture owner as well as the picture location in relation to text of the news (above the text, below, etc)
It seems that when downloading picture, it is needed to check picture for their content, at least by the simple checking (php getimagesize), and allow to download only jpg, gif, png documents. If the pictures are bigger, they are getting resized up to the set standards (Serendipity Administration Suite - Image Conversion Settings - Max. width + height). The option “allow/not allow” to show user’s pictures in the general gallery would also be useful.

Probably, the options of adding logotype and producing picture’s thumbnail would also be necessary.

Truly hope that you will find useful the stated above and we could reach mutual understanding.

Most sincerely,
Zman aka Sergey
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: some probable useful request

Post by garvinhicking »

Hi zman!
1. How the code page ru.cp-1251 can be supported?
In my case Russian language can be used correctly only in UTF8 format
(Serendipity 1.1-beta5, PHP 4.4.4, MySQL 4.1.16-max, Apache 1.3.33 Win32)
The charset of a language is determined through the "LANG_CHARSET" constant that you can find in the lang/serendipity_lang_XX.inc.php files. All files in the UTF-8 subdirectory have the "UTF-8" charset set there. So you can edit the file in the non-UTF-8 directory to alter a charset.

Take care though that changing the charset will not change any data that you already entered! All characters entered as UTF-8 previously will still be UTF-8. You will need to use a tool like phpMyAdmin or others to also change the charset of your Databases/Tables. Or you need to start with a fresh blog. Or you need to live with possibly wrong characters in older entries.
2. Is it possible to make a little improvement (probably in the form of plug-in) by adding numerical value to the category? For example - the cost of the car or object location (or latitude and longitude).
A category has a "category description" field which you could use to enter those values?

The other option is to enhance the "Extended properties for Categories" plugin to offer new custom fields. That, however, is more work - and I would first need to understand why this would be needed to see if its a general use for other people. I can only offer free work on issues that are of use for a general public - things that are unique to projects etc. I can only offer to code for a donation or things from my wishlist.

Code: Select all

3. Which plug-in can make a form with data input restriction? 
For example – restricting the data input by using a definite number of fields.
Example: the field of car run – only digitals, the comments field – up to 50 symbols. 
Which fields do you need? Generally, Serendpity does not restrict the amount of characters or their database. Do you mean a plugin that creates a Form for you? There's no plugin for that yet, but it is also not the scope of Serendipity to be a generation-framework for automatted tasks like this. This would be more the case for a framework like CakePHP or Ruby On Rails.
4. At the moment, the category tree (Serendipity Administration Suite, New Entry, Category) looks in the following way:
...
I’d like to make more convenient structure of categories menu, which provides an opportunity to dislocate the root (beginning) of the categories inside, i.e. instead of one hyper-large category to use several smaller menus, in particular:
In the Sidebar Categories plugin you can specify which category root is used to print out the subcategories.
5. Is it possible to make a search of the car with a range of several categories?
The car examples: body, state, year of issue, price?
You can configure the categories sidebar plugin to show the user checkboxes. If the user then marks checkboxes of multiple categories, he will see only entries made in any of those categories.
6. When making the news suggesting by anonymous (not logged-in) user, is it possible that the signature of this user’s news would be state anonymus - not the name of a moderator who publishes this news?
The plugin "serendipity_event_suggest" should basically store the name of a posting user. You then just need to adjust the entries.tpl template file to show that variable (foudn in $entry[properties]) instead of the author name.
7. How to make the pictures loading and pictures linking to the news as simple as possible?
I'm sorry, I don't understand what you mean with that question? Do you use the serendipity Media Manager to insert pictures? Usually a link to a picture can be entered when you choose an image to insert into your entry.

This should solve your proposal, as there you can already upload multiple files?!

It seems you are going to use Serendipity for a very specific cause. Serendipity though is usually meant to be just flexible, so that people who can code can adapt it for their features. So even though what you seem to want can be solved, it still requires some amount of PHP/Smarty coding knowledge to fulfill. This is a task we cannot take from people. In your case for example, you could build custom serendipity plugins that change the way the media upload is done.

HTH and 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