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,
"How to" make new cache type
-
- Micro
- Beiträge: 120
- Registriert: 06.12.2010, 18:28
Zuletzt geändert von harrieklomp am 17.04.2011, 12:43, insgesamt 1-mal geändert.
Owner and allround admin of the Dutch OC node.
Harrie Klomp
[url=http://www.opencaching.nl/viewprofile.php?userid=3][img]http://www.opencaching.nl/statpics/3.jpg[/img][/url] [url=http://geokrety.org/mypage.php?userid=7861][img]http://geokrety.org/statpics/7861.png[/img][/url]
Harrie Klomp
[url=http://www.opencaching.nl/viewprofile.php?userid=3][img]http://www.opencaching.nl/statpics/3.jpg[/img][/url] [url=http://geokrety.org/mypage.php?userid=7861][img]http://geokrety.org/statpics/7861.png[/img][/url]
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: cache_type.id needs to be continuous - don't leave out an id. At least map2.php requires that.
2. Additional files:
add icons to
resource2\ocstyle\images\cacheicon
resource2\ocstyle\images\cacheicon\cache
resource2\ocstyle\images\map
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:
lang\de\ocstyle\search.tpl.php
templates2\ocstyle\res_cacheicon.tpl
templates2\ocstyle\res_cacheicon_15.tpl
templates2\ocstyle\res_cacheicon_22.tpl
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.
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: cache_type.id needs to be continuous - don't leave out an id. At least map2.php requires that.
2. Additional files:
add icons to
resource2\ocstyle\images\cacheicon
resource2\ocstyle\images\cacheicon\cache
resource2\ocstyle\images\map
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:
lang\de\ocstyle\search.tpl.php
templates2\ocstyle\res_cacheicon.tpl
templates2\ocstyle\res_cacheicon_15.tpl
templates2\ocstyle\res_cacheicon_22.tpl
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.
Zuletzt geändert von oliver am 29.04.2011, 20:06, insgesamt 1-mal geändert.