sCategory Permalink

Mar 30
2007 00:55 · English (18,355 views)

Плагин позволяет выбрать категорию, которая будет использоваться для построения постоянных ссылок, на странице редактирования записей. Используйте опцию %scategory% на странице настроек Options/Permalinks (Настройки/Постоянные ссылки).

Установка

  1. Загрузите и распакуйте файлы плагина в каталог wp-content/plugins/scategory-permalink.
  2. Включите плагин “sCategory Permalink” в Site Admin (Панель управления).
  3. Зайдите на страницу Options/Permalinks (Настройки/Постоянные ссылки) в Site Admin (Панель управления) и используйте опцию %scategory% в текстовом поле Custom (Задайте шаблон) (Вы можете глянуть здесь другие опции). В этом блоге я использую /%scategory%/%postname%/.
  4. Теперь на странице Write Post (Создание записи) рядом с чекбоксами категорий появятся переключатели:
    sCategory Permalink
    Выберите переключатель напротив категории, которая будет использоваться при построении постоянной ссылки.
  5. Наслаждайтесь!

Требования

Плагин работает с Wordpress 2.0 — 2.5. Но я рекомендую обновить Ваш Wordpress до версии 2.5, так как он содержит много вкусностей.

Загрузка

Последняя версия “sCategory Permalink” — 0.3.0, и она может быть загружена отсюда:

версия0.3.0ЗагрузитьsCategory Permalink

Если у Вас есть предложения, Вы хотите оставить отзыв или нашли ошибки, пожалуйста, отпишитесь в комментариях. Это очень важно для меня!

Список изменений

  • v0.3.0 (4 апреля 2008)
    • Исправлена ошибка, когда страницы показывали ошибку 404 в Wordpress 2.5.
  • v0.2.2 (20 мая 2007)
    • Иногда переключатели не отображались (спасибо Vince Caughley и Sam Keen).
  • v0.2.1 (1 апреля 2007)
    • Удалена зависимость от устаревшей функции Wordpress 1.5 wp_get_post_cats.
  • v0.2.0 (30 марта 2007)
    • Исправлена ошибка с обработкой trackback’ов (спасибо Caio Proiete).
    • Исправлена ошибка, когда переключатели не появлялись при создании новой заметки (спасибо Jayant Kumar Gandhi).
  • v0.1.0 (18 ноября 2006)
    • Базовая реализация плагина.

Другие плагины

Полный список плагинов, которые я написал, можно найти здесь.

37 отзывов на this entry

Подписаться на комментарии по RSS или TrackBack на 'sCategory Permalink'.

Francesco @
сказал 15.04.2007 в 2.15

I can’t see the radio control with wordpress 2.1.3. There are some problems?

сказал 16.04.2007 в 13.45

Are you sure you have enabled plugin? Another possible errors: you should copy plugin files into the wp-content/plugins/scategory_permalink folder; you should have JavaScript enabled in your browser.

сказал 16.04.2007 в 18.54

Hm.. Francesco, you are right. I have same problem.
You must press button ‘Save and Continue Editing’ or ‘Save’. You will see radio control after this step.

kpumuk, if user does not save a post, there is no way to select category(user just does not see radio control :( )

сказал 16.04.2007 в 19.05

Roman, you should update plugin to the latest version. See changelog for details, this bug has been fixed in 0.2.0 :-)

сказал 16.04.2007 в 20.01

Yep, you are right. I forgot update the plugin.

Vince @
сказал 08.05.2007 в 8.58

This looks like a great plugin - exactly what I wanted. However, like Francesco, after activating I too cannot see the radio control with Wordpress 2.1.

Source code for the post page has included the scategory javascript, but still no controls.

Is there anything I can check to find out why the problem?

сказал 08.05.2007 в 13.53

Okay, you could help me (and other plugin users) if you would post some additional information: your browser (and maybe plugins, which you are using in it, especially if they are modifying html somehow,- just like greasemonkey for Firefox does), wordpress version (2.1.3 or less?), wordpress plugins (this is most important information).

You can send me this information by email (kpumuk@kpumuk.info) or post in comments. I know, it’s not easy to collect all this information… You could make several screenshots of you wordpress plugins page at least. It would be perfect.

Of course, I’m trying to locate the problem myself, but it’s not easy to reproduce.

Thanks for help!

сказал 20.05.2007 в 0.44

I’m having the same issue

  • WP 2.1.3
  • sCat 0.2.1
  • Firefox 2.0.0.3 (no extra extentions)
  • WP plugins
  • iG:Syntax Hiliter (3.5)
  • sCategory Permalink (0.2.1)

let me know if you need any other info

Sam Keen

сказал 18.07.2007 в 7.46

Hi, thanks for the update.

I have an issue with displaying subcatgories in the URL.

This are fine:

1
2
/MainCategory/SubCategory/PostTitle/
/MainCategory/

But not this:

1
/MainCategory/SubCategory/

I get a 404 error.

Sample:

1
http://jesseliwag.com/old-blog/tiaong-archive/waiting-for-my-work-to-residence-visa/157/

This is my permalinks structure:

1
/%category%/%postname%/%post_id%/
Robert @
сказал 22.07.2007 в 3.39

A really great and important plugin. i have a question, though. it seems to me that your plugin also creates new category url’s.

If domain.com/categoryname/postname than domain.com/categoryname is created for the category page.

These url’s do not replace the normal wordpress ones (domain.com/category/categoryname). That’s a shame, because category-label links under posts link to the old default url’s, while the new ones are much more logic.

I tried to fool wordpress by defining category permalink as /somestring/categoryname and post-permalink /somestring/categoryname/postname. This makes post-url return 404 though :-(.

any ideas?

Robert @
сказал 22.07.2007 в 5.53

oops. typo in admin-header. js link points to scategory_permalink, while plugin is in scategory-permalink. renaming directory solves problem

сказал 09.08.2007 в 13.34

Dmytro I figured out why people are having a hard time getting the radio buttons to show on the post page. It’s quite simple:

- On the scategory_permalink.php page, there is this line of code:

1
var $pluginLocation = '/wp-content/plugins/scategory_permalink';

If the users are anything like me, they simple unzipped the folder as “scategory-permalink.0.2.2″ so that directory that is calling on the folder isn’t correct. If you simply change that line to:

1
var $pluginLocation = '/wp-content/plugins/scategory-permalink.0.2.2';

You got the radio buttons to show! I’m sure there’s a better way you can do this… a way where you don’t even have to change that $pluginLocation… just have it so it knows no matter where it is located (since the user, like many of us, will have made the mistake in unzipping it in a different directory than the one you put hard coded in the file)

Hope that helps

сказал 10.08.2007 в 12.22

Hello,

I have a question about the plugin:

  1. What about posts published before plugin installation?
  2. Does it work with PW 2.2.2?
сказал 17.08.2007 в 20.56

Hello Dmytro,

I have used your plugin as a starting point for creating a similar one NG Primary Category WordPress plugin which inserts the radio boxes without using any Javascript (through PHP output buffering & regular expressions).

You might want to check the source code. Your comments / suggestions will be very welcomed since your PHP experience seems very advanced.
If it wasn’t for the %scategory% your plugin would have saved me from all the trouble!

Congratulations for having an excellent site, combining very good layout / presentation with very interesting subjects.

HarryK @
сказал 24.08.2007 в 9.18

I’m using WP 2.2.x, activated plugin, followed the directions and I (like the guy with the previous version you fixed) am not seeing the radio buttons come up either.

I am also getting on the write new post page an error message line 481 on post-new.php. “object expected”. When I “turn back the hands of time” and deactivate your plugin and take the scatagory out of permalinks, the write page shows no errors, so it seems this is the problem.

Hope you come up with a fix. Thanks!

сказал 05.11.2007 в 20.20

I have same problem like HarryK’s problem.

thanks.

sonika @
сказал 03.12.2007 в 9.24

А с wp 2.3.1 совместимость планируется?

Fabio @
сказал 03.03.2008 в 19.58

It is not working on WP 2.3.3

The radio buttons does not appear.

ilo @
сказал 18.03.2008 в 13.23

same here, now working with 2.3.3 :( !

does anyone know of any alternative plugins? or a way to do it manually?

сказал 07.04.2008 в 15.48

dear dmytro, ive installed everything according to the instructions, but the chosen (radiobutton) category does not show as the first one in my theme…

an example: at http://handshake.se , ive chosen “tech” (ca 19) as the main category for the latest article on intels atom. neverhteless, the article shows up as “hardware” (cat 34). i ve got no explanation for this.

ive tried to uncheck the checkbox of the radiobuttoned tech category, but that doesnt help either. then “tech” disappears entirely from the theme on pages such as http://handshake.se/tech/intels-nya-karnkraftverk/

сказал 07.04.2008 в 15.51

forgot to mention that cat 34 hardware is nested in cat 19 tech. this means that “hardware” is a part of “tech”. is this the culprit?

сказал 07.04.2008 в 16.03

Thank you for the report. Will check it in a short time.

Nick @
сказал 18.08.2008 в 6.07

Hi

Mmm, this may be a silly question, but next to each category there is a checkbox and a radio but - what is the purpose of having both of these? If i’m going to assign a post to a specific category should I select both the radio button and checkbox across from that category or only the radio button?

I’m just mystified about the checkbox when there is only reference to the radio button above.

Many thanks for a great plug
Nick

smooth
сказал 23.08.2008 в 20.35

Hi,
sadly the plugin is not working correctly with WP 2.6.1. The correct URL, as it is supposed by me, will be produced but it leads to 404. Any Chance for an update?

@Nick
The checkboxes are used originaly by WordPress to assign one (or more!) categories to your post. The Radiobutton is used by this plugin to asign only one category to your post that should be displayed in the URL if you are using the permalink feature by WordPress. If you always assign only one category to your posts, or you are not using permalinks, you don’t need this plugin.

Nick
сказал 24.08.2008 в 0.38

Hi Smooth

thanks a lot that explanation has really helped.

Nick

сказал 11.09.2008 в 19.22

[...] Install the sCategory Permalink plugin, which will let you choose which category (silo) each post should go [...]

Serg
сказал 08.10.2008 в 22.50

Супер, спасибо большущее за плагин. Пытался найти решение, но помог только ваш плагин. В такие моменты хочется найти кнопку Donate :)

сказал 09.10.2008 в 22.51

[...] answer to this minor problem was sCategory Permalink, a plugin by Dmytro Shteflyuk which allows you to tick which category your post will use for your [...]

dea @
сказал 16.10.2008 в 14.55

any suggestion how to automaticly using main category

ex.

1
domain.com/level1/level2/level3/postname/

to

1
domain.com/level1/postname/

thanks for your help

сказал 06.11.2008 в 17.38

This is the exact plugin I was looking for. Thanks so much for the time you’ve put into it.

Sadly, it isn’t working for me.

I see the radio buttons. But no matter which category I select (main category or sub-category) the permalink doesn’t change.

I’m using Wordpress 2.6.1 if that helps.

сказал 15.12.2008 в 3.09

в 2.7 всё сломалось(

сказал 15.12.2008 в 15.01

Достаточно просто пересохранить пермалинки на странице администрирования - и все работает.

сказал 16.12.2008 в 2.20

Как я рад, что всё ещё живо)
только я не могу найти где это можно сделать.

сказал 18.12.2008 в 15.00

Settings -> Permalinks -> Save

Settings -> Permalinks

сказал 19.12.2008 в 4.14

спасибо)

Jon @
сказал 03.01.2009 в 17.22

This is a great plugin, but is there a way to do it without using %scategory% and just the standard %category%? I’d like the actual permalink to be manipulated upon saving the post.

I’m building a site where posts are categorized under several different sub-categories, but I want the permalinks to be created from only one set. But I would like the posts to appear in the pages for the other categories as well.

I’d like for permalinks to be /issues/july-2009/post-name.html and I would like to be able to go to /topics/development and see the post listed there. With %scategory% I currently get a 404 for /topics/development. How can I manipulate the actual permalink creation not using %scateogry%?

Let me know if you need more clarification and thanks for all the great work you have out into this plugin!

сказал 04.01.2009 в 16.00

Hey Jon,

Thank you for your great proposal. I definitely have to implement this feature in nearest release (I’m working on it now). Stay tuned!

Оставить отзыв

Вы можете использовать простые теги форматирования HTML (вроде <a>, <ul> and others). Чтобы вставить пример код, используйте <code lang="php">$a = "hello";</code> (поддерживаемые языки: ruby, php, yaml, html, csharp, javascript). Также Вы можете использовать <code>$a = "hello";</code>, синтаксис не будет подсвечен. Если вы не хотите использовать тег <code>, замените символ < на &lt;.

Отправить

 
Copyright © 2005 - 2008, Dmytro Shteflyuk