2011-03-15, 03:41:43
roog Wrote:Thanks yojoe, looks like a good solution.I was thinking about using stripped news name + a unique number (like all articles number +1) but then the title would have to have embedded slugtranslit plugin, along with char switch array.
And this is just too much of a hassle.
Now I'm thinking if it would be a good idea to use day-month-year-[news_number] as a file name.
There are still things to solve with link to news.
I rewrite all links to add .html at the end of the slug, and get:
mypage/news.html?article=5
When I find some time I'll try to mess with modrewrite to achieve mypage/news/article/[number] URI, although I'd love to achieve mypage/news/date/[news_number] pattern.
But I have no idea how to prepare the name of the file and then create a rewrite to make date/[news_number] under condition there is more than 1 news created in the same day.
ps. to have the news saved as current_date-news_number, replace line 47 with
Code:
$today = date("j-m-Y");
$articles_number = count(get_articles())+1;
$id = empty($_GET['edit']) ? $today.'-'.$articles_number : $_GET['edit'];
Had to assign functions to vars, otherwise it wasn't working :/
Addons: blue business theme, Online Visitors, Notepad