Choosing category for pligg sites

  • Автор темы Автор темы Stroks
  • Дата начала Дата начала

Stroks

Client
Регистрация
09.02.2012
Сообщения
219
Реакции
14
Баллы
18
Is there any simple way to choose category by for pligg sites by name of the category.

I am able to select the first available category (using select tag), but i cannot select a specific category such as "General". I can choose a category only using some kind ID.

I can match a category with an ID but using Regex but i hope there is a simpler way to do this.
 
Actually i did it using regex - <option\ value="\d*[\w\W]*?(Internet|General)[\w\W]*?</option>

Any easier solution?
 
The category id is then the number of occurences of <option\ value=" minus 1.
 
select - Set - selecteditems
And use as value something like:
Regex:yourregex
 
It works. However when i use Regex:(General|.*) if the keyword General isn't present then the last category from the list is selected. Is there a way to choose the first one instead. I mean is it posible for regex .* to match the first selected item not the last one.
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)