Is it possible to re-number article pages? A number of pages simply don't exist and it would be really nice to be able to re-number articles to fill in the gaps.
At this time no, the article get a number in the DB and that is stuck with it. If you remove an article, that number will still be marked as used and not filled with another article.
Im not sure if it's possible to make some sort of dc call to make what you need, have to let IchBin or Bloc answer that one.
But the option you ask for is not available as it is now.
If you were to renumber the articles, then any pages with hard-coded links (my personal site uses quite a few) would require site-wide updating to the new numbers.
While it would be an moderate undertaking (solely speaking within the TP system), it would wreak havoc to such navigational link menus (outside of TP), and might would affect search engine results also.
I only have two articles so far, and there numbers are page=7 and 8. I'd like the first article page to be numbered 1, which I feel would make more sense.
Why not use the query title option and name (versus numbering) the article?
Your site can refer to it by 'page=info' instead of 'page=7'...
That way, you can have a permanent link by name for such articles. After a while, you may have over 300+ articles and numbers won't be easily to remember, whereas names such as 'info', 'contact', and so forth will.
Thanks, that sounds perfect - I wasn't aware I could do this - Is this option in the article's settings?
When you build or edit your article look for "Query title:" directly under your "Title"
The query title will appear below the article's title, but only after you save the article first.
Don't use spaces, as this may cause problems in browsers and/or search engines. I substitute the underscore for spaces when naming the query title.
Good luck with TinyPortal! It is the small features like this one that makes it so flexible.
Thanks guys. I'm liking SMF/TP more and more.
Another I site I am in the process of building uses vBulletin and vbDrupal. It's interesting comparing the two.
I've now re-named the articles, but an "articles" block (http://www.tinyportal.net/index.php/topic,26017.msg208172.html#msg208172) I created still uses the old numbering. Can this be fixed?
With full credit to JPDeni... I modified that code to link using the query title; if not set, it will use the page id.
global $db_prefix, $scripturl, $user_info;
$query = db_query(
"SELECT subject, id, date, shortname
FROM {$db_prefix}tp_articles
WHERE approved = 1
ORDER BY date DESC
LIMIT 10", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($query))
{
if(empty($row['shortname'])) $row['shortname'] = $row['id'];
echo '<a href="' . $scripturl . '?page=' . $row['shortname'] . '">' . $row['subject'] . '</a> ' . timeformat($row['date'], $user_info['time_format']) . '<br />';
}
You are a true gent! ;)
Trying to earn my badge here on TP... ;)
Glad you're liking TP. You should be able to see the power and flexibility that it has already, plus, I like to think, a great support staff too.
Again, good luck with TP.
I was saying just now to the guy I run my site with what excellent and super fast support you guys offer. :)
Well, there are times when replies don't come so fast, as we all volunteer our time and have real-life factors to account for...
But thanks for letting others know about TP and the support you've received. :D
My pleasure. I've learned a lot in the few weeks I've been posting here.
Oops. I guess I didn't read the second page. I changed the code over in the original topic.