Create page with unique incremental ID in confluence - confluence

I would like each page to have a unique ID but not the Confluence one.
So that at page creation automatically, the next number is picked. This has to work across spaces as it is a document count.
Is there a vanilla way to do it or if not, a plugin recommendation that does it would be fine.

Related

tx_form multiple times on one page via RECORDS

via TypoScript i generate a HTML-Table and on every line i add the same formular (tx_form formular) via RECORDS. The form can be opened in a lightbox and all is fine but when i submit one of these, all forms will be submit and i receive 16 mails.
How can i separate the forms? RECORDS is needed because i build the table in TypoScript and so i can update the form in the backend and all forms on the page are updated.
Is there a parameter which i can set unique via TypoScript for every record so every form is technical a single form?
I would use some javascript to iterate over the forms and make them unique.
As this might conflict with the secutrity mechanism from TYPO3 you alternatively can use javascript to remove other than the currently clicked form from the page. This might need a reload from the page if you have no special answer page for the form.

Blog-like single element pages with TYPO3 / TemplaVoila

I have a blog-like part of an page using TYPO3 / TemplaVoila. There are articles that should show up summarized on a single page, but have their own pages / URLs each one too.
However, having the editors add a page AND a flexible content element for each entry is complicated.
So is it possible by some typoscript to have a page, showing a single content element from some other page, sporting a proper URL without having to setup an extra page for each element?
What you want is doable without TV and with other records than tt_content.
e.g.: ext:news does it: the content are news records, which are shown with plugins in list- and detail-mode.
Of course you can reinvent the complete logic of such an extension so you can do it with tt_content records, which could be stored in the usual way scattered on multiple pages.
But the logic is clearer if there only is one page (or very few pages which represent some categorization) where special records are stored.
Plugins would be configured to show only selected records (from one category, which are marked top, which are current, ...) and you have one page (one for all and not for each news one) where the records are shown in detail.
Also each has it's own URL, either with URL-parameter (by default) or you configure realurl (or similar) to build a "real url" from news title (and uid).

Is it possible to automatically redirect a Redmine wiki page to another page?

Is it possible to automatically redirect a Redmine wiki page to another page?
I mean a mechanism similar to Wikipedia's "redirected from..." so I can assign different titles to the same page (with one of them being the main one).
I've just tried it with Redmine 3.1.0. You need access to the database. It's not that complicated, though it is not official.
Insert one line per redirect into the table wiki_redirects. You need the wiki id, which is the project id in normal cases. To find the id look into the wikis table.
Insert:
id: (should be set by the database system)
wiki_id: From which wiki should be redirected (is likely the same as wiki_id if redirecting takes place in a single wiki, and not across projects)
title: The not existing page name from which will be redirected
created_on: some date (I wouldn't use one which is in the future...)
redirects_to: the target page name
redirects_to_wiki_id: the target wiki id
Since your working in the database you have to maintain the entries there. Modifications and deletions have to be done there as well.

How to setup redirects for a large number of posts

I am working on a major site migration for alpinezone.com . As part of that migration, I moved all the news articles from vbulletin into wordpress cms. The vbulletin articles were previousyl pulled out via a plugin called GARS.
In any event, I have 3400 news articles over the course of five years or so. They are presently in the following format:
news.alpinezone.com/12345
If the title of the news article was "Sugarloaf Sets World Record" then the new location will be
alpinezone.com/sugarloaf-sets-world-record/
Is there a way for me to automate creating the necessary redirects that take the title from the literal page 12345 and convert into a URL?
Finally; the additional trick is that since I did a VB upgrade the existing news articles no longer show up. So going to news.alpinezone.com/12345 won't show anything right now, you need to pull up the forum thread (which is typically hidden) by taking that identifier and going to http://forums.alpinezone.com/showthread.php?12345 to see the actual title. I can pull all this from the WP database, (since all the posts are from a user AlpineZone News).
Any ideas? I'm fairly new to this and the added complexity of subdomains is somethign I am trying to figure out. Thx!
you could make your own showthread.php file in the correct location it was previously located.
have it use the passed id, retrieve the associated record from your database.
Construct the new url by turning the title to lowercase and changing spaces to - and do a redirect via header('Location: new url here');

mongoid / mongodb - replicating/copy records

I am building a cms where the site and pages are stored within mongo. I need to be able to create a new site using another site as a template.
For example:
Site A - news page and home page
Create a new site selecting site A as a template, this selects site A and then makes copies of each page site A owns and saves them under Site B
The result
Site A - news page and home page
Site B - news page and home page
Site B will be able to then use site A as a starting point to build there new site.
I am new to Mongo/mongoid so really would like some pointers about the best way to approach this.
Thanks
One way to organise the data is to use collections with the site ID as the namespace, giving you collections like:
site_a.pages
site_a.news
site_a.users
site_b.pages
site_b.news
site_b.users
To create a new site from an existing one, you would copy the relevant collections (possibly excluding .users for example), changing the namespace. That is, copy site_a.pages to site_c.pages. In the shell:
db.site_a.pages.find().forEach( function(x){db.site_c.pages.insert(x)} );
Note that site_a is not a database name, but the namespace of a collection.
There is a limit to the number of collections you can have in a database that might be a problem if you're hosting the CMS in the cloud for many customers. You could get around this by having different databases for different customers. You should read the documentation on this for more details.
Another way to do this is to put the site ID in each document and always filter for this in your queries. Then you would only have a few collections, for example:
pages
news
users
With the documents in those collections having a site_id field:
{
"site_id": "site_a",
"page_title": "Homepage",
...
}
The copying would be similar to above (but with filters and updating the site_id field in the function). I think namespaces for collections is a neater approach however.