Uh… what the … o.O
I just noticed this as I'm going through my backlog of emails. This. Sounds. Incredible.
* goes off to test it out *
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
Request #1: Open in new windows/tab
It would be better if I could force the new page to be created in a new window/tab. Could you add that option?
Request #2: The ability to specify default text for the textbox
It'd be great to be able to specify some default text for the box… if that is possible.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
It took a while, but I've finally integrated the features you requested :-)
The reason it took me a while was because I decided to re-write the entire Javascript code — I made it unnecessarily complicated in the first place. Simplifying the code also removed all of the bugs in it too :-)
The new features are great!
I'm having a bit of a problem trying to figure out how to tweak the css of the input box default text. I'd like to darken it up a pinch or two, but can't quite get the element ID'ed properly. For example if I put style=color: #444; background-color: red; into the module parameter list, I don't see the default text change, but I do see a red border inside the input box. It seems that a white text background is coming from somewhere (my own css perhaps). Using Firebug, I see that the CSS is applied to the iframe element, but I think what I'm looking for needs to apply to the form element.
@James, can you document this a bit more with a list of attributes we can tweak? BTW, it's nice to see you active again!
Thanks,
Ed
Thanks! Will be trying them out now.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
Cheers guys! Glad you like it :)
@Ed, I manually darkened the text for you (#666), and I fixed the TextBox to have a transparent background (so now you can set the background colour yourself)… but dynamically changing the font style/colour is something that is a bit too complex for my limited spare time at the moment. Sorry!
However, when it gets done, it will be via specifying a CSS stylesheet to run with the module.
OK, thanks for the tweak. It looks a lot better. After posting, I did see where the styling was done, but now that you've changed it, I won't have to mess with it. I'm helping another user set up multiple sites and am making great use of your talents with this and the SUO snippet.
Thanks again,
Ed
Is it possible to have just a button with no textbox?
Scenario:
I am working on a Customer Management wiki (sorry it's closed to all but a few) [leiger and RhombusP have access.] In a Customer Record, I want a button that adds a new Work Order, as I already have set up auto-numbering and Page title format:[WO #%d] I do not need the NewPage button to have a text field as it's title is automated.
I have other senarios like; adding PC Details to a Cusotmer, adding Labour to a WorkOrder, etc, all of which do not really need to have text fields IF I'm using auto-numbering.
Current Use: Currently I'm using this;
[[module NewPage category="wo" button="Add Work-Order" parent="%%fullname%%" tags="open" align="left" size="15" preview="true"]]
What I'm Trying To Achieve:
Button + AutoNumbering + NewPage - Text Field
Thanks in advance
~ Paul
The NewPage Module is only useful for creating data based on the user's input.
What you are trying to achieve doesn't need User Input… so you can drop the idea of using a NewPage Module entirely.
Edit: See here for the solution to your problem.
You can do that with just a simple link… but James has posted an even better solution — using a simple link + adding CSS to make it look like a wikidot button.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
Hey Paul,
I went that one step further for you… and created the NewPage Button.
This should make things MUCH easier for you, as the syntax is virtually the same as the NewPage Module. Just to prove my point, I will use the example you provided me above with the NewPage Button:
[[include :snippets:newpage-button NewPage
|category=wo
|name=new-page
|parent=%%fullname%%
|tags=open
|button=Add Work-Order
]]
The reason I did this is because you brought to my attention that this is something lacking in Wikidot. There's no easy way to create a NewPage link without having to learn the URL syntax… until now :D
Hope you like it.
It's good to know that in between my incoherent babble, sometimes something makes sense. ;)
I'll be trying it out later, will post back. I'll be using this a lot! Thanks.
Actually, you were just trying to articulate something that you needed, but didn't exist yet…
That's the challenge for all programmers… trying to find solutions to problems that shouldn't exist.
You might wish to be aware that if the extended newpage module is opening a page with a data form in the live template, the syntax must include name=something. If you omit this a normal page editor is opened and not the data form.
Sorry I should have posted in the extended newpage button page
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
Interesting. Is this the only way to directly edit a page that has a data form in the live template?
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
No you can edit it in the normal way. I was trying to create a data form page using the extended newpage button (hence I posted on the wrong page). It works fine as long as you have name= in the syntax. I can't seem to get the non-button version to work with data forms in live templates at the moment. I must be doing something silly.
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
Hi Rob!
Yes, you need to have the |name= variable equal something. If you don't put anything in the |name= field, then the url will look something like this:URL | Interpreted as this |
---|---|
site.wikidot.com/data-form-category: | site.wikidot.com/data-form-category |
So you see, when you saw the normal editor instead of the data form, you were actually editing a page in the :_default category (which isn't a data form category).
This is also the same with autonumbered categories. You need to specify a page name to create the page (the page name is then changed to a number).
Does this help you a bit?
No you can edit it in the normal way.
When I click edit, I'm presented with a data form. If I create a new page either by link or the NewPage module, I'm presented with a data form.
I didn't think that it was possible to edit a data-form-templated page without having to go through the data form to do it.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
You can't, it's not possible. I wasn't clear enough:I didn't think that it was possible to edit a data-form-templated page without having to go through the data form to do it.
Page | Description |
---|---|
start | the page “start” is in the “_default” category |
start:now | the page “now” is in the “start” category |
start: | the page “start” is in the “_default” category |
Yes I understood what you were saying perfectly James :)
I was replying to Ed in my post (which is why I quoted part of his post)
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
Have you done something to break this snippet James? At the page here I just get a "No such page" error message whenever I try to create a page using
[[include :snippets:newpage
|category=acquisitions
|name=acquisition
|tags=2004
]]
It should create a page with a dataform on it. I tried it on another site with a standard page but still get that message. I'll go back to using the buttons for the time being.
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
Sorry, I was trying to add functionality, but I failed. Reverted to old version for now.
Thanks James, that's now working well.
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
This may be blatantly obvious, but it was a big 'ah hah!' moment for me…
If you want the user's input to also be created as a page tag, just put:
[[include :snippets:newpage
|tags=#
]]
This is particularly useful for selecting pages with the ListPages module. And it just made my life a whole lot easier.
Cheers,
Bryce
James (or other guru), is it possible to include the current date and/or time in the url output?? So that if the user's input is this is my page, the url becomes something like…
http://www.wikidot.com/2010-11-24-this-is-my-page/edit/true/title/this-is-my-page
Thanks,
Bryce
Oh really? Well how about this then! Ah ha!
May I warn you to prepare to cringe at my very rudimentary, nigh nearly non-existent Javascript skills. Yet my determination to make this work somehow produced a semi-alright result. Critique welcome…
I have the feeling - all CSI-used "snippets" ( and their codes) should be blocked by the authors when working well and sre finished in the creating setup - to make them secure against trolls or changes wihtout any need…
Means - even a new version by the author himsels should be copied to a new version-numbering to secure the running version of codes?
What is your oppinion?
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Hmm.
I suppose restrict the permissions to “only edit pages owned by me”. That way anyone can create pages, but they can't edit other people's pages. Perhaps only members of Snippets should be able to edit other people's snippets.
This is a good idea, seeing as some of the CSIs here are quite heavily used.
I noticed that in cases where the user types in a regular expression that is incorrect, the module will fail to work when the user submits the input.
Now there is an implemented solution to this: an error message lets the user know that an invalid regular expression was used to construct the module.