Autor Thema: "how to" make new attributes  (Gelesen 288 mal)

Offline harrieklomp

  • Team Opencaching Deutschland
  • Micro
  • *
  • Beiträge: 119
  • oc.nl team
"how to" make new attributes
« am: 17. April 2011, 14:31:08 »
We from the Dutch node like to add some more attributes on the site like "paddo" (roadsigns for bikes in a shape of a mushroom), bike and some other attributes.
It would be great to get a "how to" make this on our own.

We have found some one who is very artistic with graphics and he has no problems that other nodes will use the attributes icons, look for a sample at http://www.opencaching.nl/articles.php?page=cacheinfo#attributes .

Greetings
« Letzte Änderung: 17. April 2011, 14:32:46 von harrieklomp »
Owner and allround admin of the Dutch OC node.

Harrie Klomp


oliver

  • Gast
Re: "how to" make new attributes
« Antwort #1 am: 17. April 2011, 20:59:45 »
1. database changes:

add to table cache_attrib
(category and group refers to table attribute_categories and attribute_groups)
(keep trans_id empty)

2. additional files:

place them in resource2\ocstyle\images\attributes

3. translation:

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

Offline OlofL

  • Nano
  • **
  • Beiträge: 70
  • OC SE Team
Re: "how to" make new attributes
« Antwort #2 am: 17. April 2011, 22:53:30 »
... and start with ID number 61 and allocate the number by posting the attribute name and number in this thread.

Offline zaanhoeve

  • Nano
  • **
  • Beiträge: 24
    • Opencaching.NL
Re: "how to" make new attributes
« Antwort #3 am: 24. April 2011, 14:03:04 »
added:
   Edit    Delete    60    Stealth    stealth    1746    5    1    0    0    0    resource2/ocstyle/images/attributes/stealth.png    resource2/ocstyle/images/attributes/stealth-no.png    resource2/ocstyle/images/attributes/stealth-disabl...    The cache is in an urban environment and will requ...    1747
   Edit    Delete    61    Benchmark    meetspijker    1744    4    1    0    0    0    resource2/ocstyle/images/attributes/meetspijker.pn...    resource2/ocstyle/images/attributes/meetspijker-no...    resource2/ocstyle/images/attributes/meetspijker-di...    Dit attribuut is voor de meetspijkers van het Kada...    1748
   Edit    Delete    62    Mushroom    paddo    0    4    1    0    0    0    resource2/ocstyle/images/attributes/paddo.png    resource2/ocstyle/images/attributes/paddo-no.png    resource2/ocstyle/images/attributes/paddo-disabled...    Dit is een attribuut voor de ANWB " paddenstoelen"...    

tnx for the help
« Letzte Änderung: 24. April 2011, 14:13:00 von zaanhoeve »
Regards Kees

oc.nl

Offline OlofL

  • Nano
  • **
  • Beiträge: 70
  • OC SE Team
Re: "how to" make new attributes
« Antwort #4 am: 25. April 2011, 08:48:37 »
63:

6x    Wheelchair accessible    wheelchair    1802    2    1    0    1    0    resource2/ocstyle/images/attributes/wheelchair.png    resource2/ocstyle/images/attributes/wheelchair-no....    resource2/ocstyle/images/attributes/wheelchair-dis...    This geocache is accessible from wheelchair.    1803    NULL

(I will change this to use 63 right away avoid future confusion, it is using one of the already allocated numbers above)

Offline OlofL

  • Nano
  • **
  • Beiträge: 70
  • OC SE Team
Re: "how to" make new attributes
« Antwort #5 am: 25. April 2011, 09:10:09 »
An important feature added in the upcoming release is a possibility to hide attribute types.

With the attribute hidden, the user cannot select it when modifying his/her caches, the user cannot search for it etc, but the attribute is still there. The reason for this is to make site integration easier and at the same time allow the freedom of node-operators to choose which attributes are interesting for each node.

Offline harrieklomp

  • Team Opencaching Deutschland
  • Micro
  • *
  • Beiträge: 119
  • oc.nl team
Re: "how to" make new attributes
« Antwort #6 am: 25. April 2011, 09:32:08 »
For a non programmer like me :-[ it would be nice to run a small program where we can select or deselect  all available attributes.
Owner and allround admin of the Dutch OC node.

Harrie Klomp


Offline OlofL

  • Nano
  • **
  • Beiträge: 70
  • OC SE Team
Re: "how to" make new attributes
« Antwort #7 am: 25. April 2011, 11:46:00 »
Yes, maybe that should go somewhere on the admin-screen, but it is not complicated to do without it: Locate the table cache_attrib. It has a new column "hidden". Set the value to 1 for attributes that should hidden or 0 or null for attributes that should not be hidden.

But the hidden attribute is not in your code yet, only in mine, be patient.

oliver

  • Gast
Re: "how to" make new attributes
« Antwort #8 am: 25. April 2011, 14:21:54 »
In the past we had an attribute "Hyperlink to another caching portal only".

We have disabled it, but it is still there. For old caches that have this attribute assigned, you can see it, you can search for it and the owner can remove it. But for new caches, it cannot be assigned. Thats the use of column "selectable". I think that fits our requirement that some node maintainers wants to hide some attributes.

In my opinion, an attribute should always be shown when the owner of the caches has assigned it. Think of the atttribute "dangers". If you hide it, that could be bad for the finder. Regardless of the node the user is actually using ... the attribute must be shown.