Loading...
 
Skip to main content

Themes


open edit-submission.tpl in a wiki page

I have created several article topics for users to poste jobs, resumés, articles etc... I would like to open the edit_submission and edit_article "box" -don't know how to call it- in a wiki page in order to display different instructions for each topic.

Can I do that and how? I have tried on the page but ir doesn't work


Thanks. Helene

> I have created several article topics for users to poste jobs, resumés, articles etc... I would like to open the edit_submission and edit_article "box" -don't know how to call it- in a wiki page in order to display different instructions for each topic.

I believe you're going to have to go the other direction: add the instructions to the the tiki_edit_submission.tpl and tiki_edit_article.tpl template files. These files need the logic and database queries provided by their respective php files. So it's probably better to add your instructions to those files, I'd say.

You can make use of Tiki's dynamic content blocks. Write the instructions as content blocks and note their id number. Then just add {content id=1} or whatever the number is to the appropriate place in the templates (and upload the modified files to your Tiki/templates directory). For example, a paragraph could be added around line 20 of tiki_edit_submissions.tpl, just below the closing h1 tag.

Dynamic content blocks aren't wiki parsed, so use conventional HTML tags for any styling or layout you want to do. The advantage of using dynamic content blocks is that you can modify the instructions from Tiki's admin page rather than having to edit and upload the template for every change. The template modification and upload only needs to done once, to give it the content block include tag.

This may be more complex than you were expecting, but I think it's the best/only way. If you need more specifics, please post again.

-- Gary


As Chibaguy said..
I will modify the template templates/your_style/tiki-edit_submission.tpl by adding some html text at the top of the templates


Thanks Sylvie & Chibogy.
Indeed, this is more complex than I thought.
With this solution, how do I link the dynamic content to the article topic? Do I need to introduce a condition in the edit_submission template? Or create as many edit_submission templates as I have topics?

The other pb I foresee is that the text/instructions if specified at the template or dynamic content level and requiring html code will not be easy to maintain/edit by our content admins that are not tech freaks... Too bad!

I was wondering if there would be a way to open kind of pop-up windows editable with wiki syntax (sorry if I don't use the proper vocabulary...)

Thanks for your assistance. Helene

> Thanks Sylvie & Chibogy.
> Indeed, this is more complex than I thought.
> With this solution, how do I link the dynamic content to the article topic? Do I need to introduce a condition in the edit_submission template? Or create as many edit_submission templates as I have topics?

I overlooked the fact that you wanted different instructions displayed for each topic. That does complicate things. It might be possible to modify the files to load the instructions dynamically, but that seems like it would not be easy to do. Sylvie may have an idea about that.

Another alternative would be to have a menu bar displayed with a series of help links, one for each topic. Then the article author would click on the appropriate one and a pop-up window would display a wiki page (wikitext only — no side columns, etc.) with the instructions. The menu bar could be written as a dynamic content block, so the admin could add/delete links as necessary. Of course this depends on the author noticing/clicking the correct help link.

> The other pb I foresee is that the text/instructions if specified at the template or dynamic content level and requiring html code will not be easy to maintain/edit by our content admins that are not tech freaks... Too bad!

Right. But wiki pages could be used if you just insert help links, or the article edit template could be given an iframe at the appropriate location that would load a wiki page. I think writing and displaying the help pages isn't as big a problem as figuring out how to have them load dynamically for each topic.

> I was wondering if there would be a way to open kind of pop-up windows editable with wiki syntax (sorry if I don't use the proper vocabulary...)

Yes, it's possible. Tiki has javascript on hand for popup windows, and wikitext-only templates can be used for the window content — content that can be edited as a normal wiki page. I've seen or done myself the necessary bits and pieces, and can try to help get them together.

-- Gary


> Another alternative would be to have a menu bar displayed with a series of help links, one for each topic. Then the article author would click on the appropriate one and a pop-up window would display a wiki page (wikitext only — no side columns, etc.) with the instructions. The menu bar could be written as a dynamic content block, so the admin could add/delete links as necessary. Of course this depends on the author noticing/clicking the correct help link.

> Tiki has javascript on hand for popup windows, and wikitext-only templates can be used for the window content — content that can be edited as a normal wiki page. I've seen or done myself the necessary bits and pieces, and can try to help get them together.

Thanks Chibaguy.

I think the solution with a menu bar as a dynamic content block leading to popup windows in wiki text without side columns and top bar would be workable. I would be glad if you helped me set this up. I don't have access to everything, but for what I can't do myself,I can get the instructions to the right people.

Templates I have access to and can modify
Dynamic content, I can write in html if I have the proper pugin or code to open the pop-up windows.
Content templates, I have never used... and have no clue
Which plugin or code to use for plain white wiki text popups... I have no clue either

Thanks in advance
Helene

> I think the solution with a menu bar as a dynamic content block leading to popup windows in wiki text without side columns and top bar would be workable. I would be glad if you helped me set this up. I don't have access to everything, but for what I can't do myself,I can get the instructions to the right people.

Here is a solution that will put the help links on the Edit Article (tiki-edit_article.php) and Edit Submission (tiki-edit_submission.php) pages using dynamic content, and the help pages will just be the main part of the wiki page without columns, etc.

Making a new Dynamic Content Block

First make a new dynamic content block. (Unfortunately dynamic content block creation is a bit convoluted and things are named strangely, but if you go step by step, it'll work.)

  1. Go to the Dynamic Content page (tiki-list_contents.php)
  2. Write the description for the new block (something like "Article topic help links") and click save.
  3. The new block will then appear in the available content blocks list. Note the Id number. This is part of the tag that will go in the template files.
  4. Click the new block's "program" link
  5. This time, the "Description" textarea is where the content itself — the HTML code — goes. Paste the (customized by you) contents of the "article_help_dynamic_content_block.txt" file that you can get here: http://www.zukakakina.com/tiki-download_file.php?fileId=5Question. Click save. (The edit area is rather small, on my displays at least, so it might be easier to edit the file in a text editor and copy and paste it into Tiki.)
  6. After the page refreshes, you should see the help links more or less as they should appear on your article edit pages.

Of course, the dynamic content that I suggested needs to be modified. The title of the help box, the instructions, link content, and URLs you should change to fit your needs. Just keep the window pop-up code intact so that it functions. The window size can also be altered by changing the figures if necessary. At the least, you will have to replace my pagename place-keepers so that the code calls your own help pages.

Modifying the template files

The two template files (tiki-edit_article.tpl and tiki-edit_submission.tpl) will have to be edited. I suggest putting the dynamic content zone tag just after the closing h1 tag, so {content id=1} (or whatever your number is) will go on about line 20 of each of the two files. Do the modifications and re-upload them to the /templates directory (if you are editing them locally and transferring them to the server with ftp. Or modify them on the site if you are using Tiki's edit-templates feature.)

Making the help pages

Now for the help pages themselves. Make normal wiki pages. The secret to getting page displays with no columns or top and bottom bars is that the URL "tiki-index_p.php" is used. This file is part of the default Tiki archive and very handy for this sort of thing. The pages don't have edit links, of course, so for any future editing, two ways are to use the "Quick edit wiki page" module or the URL tiki-editpage.php?page= with the help page name appended.

The pages will have the same theme as the rest of your site. You can use Theme Control to give them a specific theme if you like,

I used a c-box div to give the links on the article edit pages a style that seemed to match the rest of the page. You can change this by modifying the dynamic content block as you like.

Let me know if you have any problems.

-- Gary


Super! Thanks Chibaguy! It works.

The most difficult was to put the content tag it the right place in the template: placing it after the h1 tag was giving strange results: continuing on h1 style... I placed it after the list submission link a few lines below.

For content admins, I created a wiki page with the links to instruction pages, and I placed a link to this page on our fast admin menu.

Thanks again.
Helene

> Super! Thanks Chibaguy! It works.
>
> The most difficult was to put the content tag it the right place in the template: placing it after the h1 tag was giving strange results: continuing on h1 style... I placed it after the list submission link a few lines below.

I meant after the closing (/h1) tag, if that wasn't clear. In my test, I put it on the line after that tag and before the links that follow. But as long as you got it to work and the displayed pages can be used easily, that's what counts.

> For content admins, I created a wiki page with the links to instruction pages, and I placed a link to this page on our fast admin menu.

Sounds good.

-- Gary

> > Super! Thanks Chibaguy! It works.
> >
> > The most difficult was to put the content tag it the right place in the template: placing it after the h1 tag was giving strange results: continuing on h1 style... I placed it after the list submission link a few lines below.
>
> I meant after the closing (/h1) tag, if that wasn't clear. In my test, I put it on the line after that tag and before the links that follow. But as long as you got it to work and the displayed pages can be used easily, that's what counts.

Well, I did put the code after the closing h1 (/h1) tag, but still h1 seemed to persist and smeer on the next lines... Probably due to our css...

For the record, and once the layout looked OK, I also had to enclose the code in a table tag in order to avoid the "Mozilla gets the right menu bar out of the window" problem. Another css issue?

Anyway, it's up and runing, and the only thing I am looking forward to now is traffic and participation. Thanks again!

>
> > For content admins, I created a wiki page with the links to instruction pages, and I placed a link to this page on our fast admin menu.
>
> Sounds good.
>
> — Gary