Opencaching Community

Opencaching International => HOWTO questions => Thema gestartet von: harrieklomp am 17. April 2011, 12:34:24

Titel: "How to" make new cache type
Beitrag von: harrieklomp am 17. April 2011, 12:34:24
The Dutch node would like to make a view cache types, like "Guestbook" and "Deaddrop (usb)"

It should be a good idea to make a kind of menu for the Admins to choose from what kind of caches there are available in a node.

Thanks and greetz,
Titel: Re: "How to" make new cache type
Beitrag von: oliver am 17. April 2011, 20:51:33
1. Modification in database:

add to table cache_type (keep trans_id empty)
add to table cache_logtype (entries with log_type_id 1,2,3 is for Found, Not found, Note)

Note: needs to be continuous - don't leave out an id. At least map2.php requires that.

2. Additional files:

add icons to
lang\de\ocstyle\images\cache (must be .gif)

To have it working in all situations, you have to add all combinations with -a, -n, -s in the filename.

same icons to lang\de\ocstyle\images\cache (for search.php)

3. Modifications in template files:


4. translation

call translate.php and translate the cache type name
(you need to execute "Scan source codes" first)

Point 3 could probably be reduced to one res-tpl-file in future.

The concept is to have a few basic cache types like "traditional, multi, event" and do all other things with attributes. The cache types "math/physics" and such specific ones come from the beginning, where we did not have any attributes.