Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I18N Special Pages
I18N Special Pages version 1.1.3:
  • fixes the problem that the "Add this page to the menu" was not hidden, when the settings of this special page type specified "Not in menu".
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
(2013-05-03, 04:25:45)mvlcek Wrote:
(2013-05-03, 00:04:33)zintonio Wrote: I have installed I18N I18N special pages and whenever I save a page the order of the page in the menu is not saved.
I make an example, I would like to have:
Home
About
News
Contact
But whenever i change the content of a page this order will not be saved and i can have like this:
About
Contact
News
Home
Why happens this thing?

Which plugins besides I18N Special Pages do you have installed?
What do you mean with "not saved" - the order changes if you reopen the page in the administration or do you mean the menu in the frontend?
What do you use to display the menu in the frontend?
How did you configure the option "Menu" in the special pages type?
Or does this happen for all pages, not only special pages?

I installed I18N base e I18N navigation. Disabling this two the problem is solved. I explain better what was the problem helping wtih example.
When I activate the plugin (I18N base, I18N navigation) the page of editing change. In particular, the part relative to displaying the menu in the frontend:
Befor plugins activation: menu taste --> priority (1, 2 , 3, etc.).
After plugins Activation: menu taste --> priority (first page, after about, after contact, ecc..)

The problem is that the don't memorize the priority. If I set home page as first, when I edit another page the home page change the priority.
I want: Home, Abouts, News, Contact
if, for some reason, I need to edit a page I go to watch the priority and I note that it is different from what I had put previously.

I don't know If I am clear.
Thanks
Reply
When you create a new special page type, in the Page Template dropdown, files ending in .inc.php should be excluded from the list (e.g. Innovation theme)
Reply
Can anyone point out a tutorial or help explain how to use this plugin? The usage/installation instructions of this plugin are terrible. Do I have to use a specific php code in a template to show special pages?
Reply
Smile 
together with this plugin to use the plugin I18n Search
http://getsimplecms.ru/plaginy-dlya-gets...ial-pages/ Wink
Reply
(2013-05-13, 20:00:20)kolorguild Wrote: Can anyone point out a tutorial or help explain how to use this plugin? The usage/installation instructions of this plugin are terrible.

I don't know what the problem is: read the Usage section of the plugin (here) and follow the instructions. (Nearly) each setting on the configuration tabs is explained directly on the configuration tabs.

(2013-05-13, 20:00:20)kolorguild Wrote: Do I have to use a specific php code in a template to show special pages?

No, otherwise it would say so in the usage instructions.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
(2013-05-13, 20:00:20)kolorguild Wrote: Can anyone point out a tutorial or help explain how to use this plugin? The usage/installation instructions of this plugin are terrible. Do I have to use a specific php code in a template to show special pages?

Define the page types by going to Plugins -> Configure I18N Special Pages (here you set up new custom/special fields to better structure your page's data), then create those pages by going to Pages -> Create New Special Page and click the desired page type. You will then have those created fields available to you for that new page. Editing pages is simply done by clicking on them from the Pages view like any other normal page.

If your problem is in understanding how to display the contents of your newly defined fields, remember that to do so you need to specify in the template where to output that field's contents (which you can do from Plugins -> Configure I18N Special Pages) like so:

Code:
<?php get_special_field('fieldname'); ?>

If you need more help, I specifically wrote some tutorials upon request earlier this year which may be helpful:

http://soaw.hostingsiteforfree.com/i18n-...s/?lang=en
http://soaw.hostingsiteforfree.com/i18n-...s/?lang=en
http://soaw.hostingsiteforfree.com/i18n-...s/?lang=en
Reply
how to use a checkbox? please teach.
Reply
It depends on the purpose of the checkbox's use. Are you using it to have an option for displaying page content (like the Add this page to the menu checkbox)? If so...

Create the special field from the FIELDS tab of Plugins -> Configure I18N Special Pages with your default value in mind (i.e 'on' or simply leave it blank).

To make the checkbox affect how (or what) content is displayed, use its value in a conditional on the VIEW tab. For example, to display a different message depending on whether it is checked, the below would suffice:

Code:
<?php if(return_special_field('fieldname')=='on') { ?>
  Checked
<?php } else { ?>
  Not checked
<?php } ?>

You could for instance use it to display custom messages about the page's configurations, or simply enable/disable features. Using it with the external comments plugin, you can make the checkbox enable/disable the comments box like so:

Code:
<?php if(return_special_field('fieldname')=='on') { ?>
  <div class="comments"><?php get_external_comments($id, $url, $title); ?></div>
<?php } else { ?>
  <div class="comments">Comments box disabled</div>
<?php } ?>
Reply
a very big thank you
Reply
Hello,
I would like to return on a question I posed some time ago but which went unanswered.
Is it possible to have a field linking to a document (i.e. pdf) rather than to an image or a slug?
This could be of great importance when setting up catalogs of technical products which often needs of a detailed fact sheet, made available through pdf.
Thanks.
Reply
(2013-05-14, 17:51:49)GPB61 Wrote: Hello,
I would like to return on a question I posed some time ago but which went unanswered.
Is it possible to have a field linking to a document (i.e. pdf) rather than to an image or a slug?
This could be of great importance when setting up catalogs of technical products which often needs of a detailed fact sheet, made available through pdf.
Thanks.

Basically yes (use a text or link field), but there is currently no possibility to select a document - you have to enter the link manually.

But if you take care to use filenames based e.g. on the page slug, you can include them without a field. Just add code like the following to your view code in the special pages setup:
Code:
<?php
  global $SITEURL;
  $detailsfile = 'products/'.return_page_slug().'_details.pdf';
  if (file_exists(GSDATAUPLOADPATH.$detailsfile) {
    echo '<a href="'.htmlspecialchars($SITEURL.'data/uploads/'.$detailsfile).'">Details</a>';
  }
?>
Adjust the $detailsfile to your convention on how to store such files.

Edit: Semicolon after echo line added.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
(2013-05-14, 18:18:25)mvlcek Wrote: Basically yes (use a text or link field), but there is currently no possibility to select a document - you have to enter the link manually.

Thanks for the hints. Indeed, this is what I've used to overcome the problem. This choice works perfectly on the developer side but, on the other hand, it has the disadvantage that is it not really appreciated by the final customers who usually prefer click-and-select solutions.

(2013-05-14, 18:18:25)mvlcek Wrote: But if you take care to use filenames based e.g. on the page slug, you can include them without a field. Just add code like the following to your view code in the special pages setup:
Code:
<?php
  global $SITEURL;
  $detailsfile = 'products/'.return_page_slug().'_details.pdf';
  if (file_exists(GSDATAUPLOADPATH.$detailsfile) {
    echo '<a href="'.htmlspecialchars($SITEURL.'data/uploads/'.$detailsfile).'">Details</a>'
  }
?>
Adjust the $detailsfile to your convention on how to store such files.

This code is great, and I will implement it for sure every time a website can be created within the boundaries of the above script. Indeed, it can not be used if for one product I should need of two fact sheets, or when I can not change the name of the .pdf due to brand policies. However these are particular situations and I think that for most cases it can be used with success.
Thank you very much.
Reply
@Oleg06: no problem :-)
@mvlcek: - a semicolon is needed on the end of that command in the if statement (just a heads up for anyone who copy-pastes the code).
@GPB61: I've modified the code to deal with your two requests.

Code:
<?php
  global $SITEURL;
  $detailsdir = 'products/'; // modify to your file directory
  $extensions = array('jpg', 'jpeg', 'gif', 'pdf'); // modify to include only desired file types
  $item = return_page_slug(); // done to prevent calling the function repeatedly
  foreach ($extensions as $extension) {
    if(file_exists(GSDATAUPLOADPATH.$detailsdir.$item.'.'.$extension)) {
      echo '<a href="'.htmlspecialchars($SITEURL.'data/uploads/'.$detailsdir.$item.'.'.$extension).'">Details</a> ';
    }
  }
  if(file_exists(GSDATAUPLOADPATH.$detailsdir.$item.'/')) {
    echo 'Details: ';
    foreach(glob(GSDATAUPLOADPATH.$detailsdir.$item.'/*') as $key=>$filename) {
      $file    = end(explode('/', $filename));
      $fileExt = strtolower(end(explode('.', $file))); // makes extension match case-insensitive
      if(in_array($fileExt, $extensions)) echo '<a href="'.htmlspecialchars($SITEURL.'data/uploads/'.$detailsdir.$item.'/'.$file).'">('.($key+1).')</a> ';
    }
  }
?>
?>

How to use:
- Set $detailsdir to the corresponding uploads folder of your product items.
- In $extensions, include the file types that you want to be displayed (e.g. if you want to show only .pdfs and .docs, ensure that they are in the array and no other extensions).
- If you only have one file for that particular item, then just upload it to the $detailsdir directory and it will be displayed as per mvlcek's version.
- If you want to have more than one file shown item, simply create a sub folder with that item's (well, the slug's) name and upload them there. All entries will be shown (showing n files as "Details: (1) (2) ....(n)").

This will allow you to have any number of files shown per item and no longer need to worry about naming conventions (if you simply put those files in the correct subfolder).
Reply
I18N Special Pages version 1.2:
  • supports a new field type "file", which allows you to browse all uploaded files as opposed to just the images (@GPB61)
  • fixes the WYSIWYG editor's page browser to work with I18N's fancy URLs (e.g. %LANGUAGE%)
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
All is in working order (I'd forgotten to update I18N recently and so the tabs were broken on Special Pages at first, but the update fixed it). Nice stuff once more. *thumbs up*
Reply
Guys, you left me speechless! Thank you so much for you support!
Just updated the plugin and it works like a charm. With this last addition I can hardly find something you can not do with GS and I18N plugin series...

I was also wondering if, by chance, SpecialPages could also be filled in via front end.
Let's admit to have a website with a membership. I could create one SpecialPage containing all the fields useful to describe each user (i.e. fields like "name", "address", "avatar", etc.) and my question is if those fields could also be updated by the user itself (perhaps behind a restricted area) via a form on his/her personal page created in this way.
Well, perhaps I'm just talking about SciFi, but this plugin is a source of neverending ideas...
Thanks!
Reply
No problem, GPB61 :-)


*rubs hands together* hehehe, I'm working on a plugin that will allow for exactly the type of user interaction that you specified. It's not yet at a stage where custom user fields can be created, but let's just say that it and its child plugins will allow for users to register one account to access a message board, shoutbox, threaded comments system and a private messaging system. Though not an i18n plugin, in the spirit of i18n it is language compatible (using i18n's language hooks), be easily used with Special Pages to generate custom members-only messages and will be fully i18n search-able. Can't put a date on when it'll be released because it's taking me a lot longer than expected, but hopefully it's a step in the right direction.

Sidenote: Your request is currently not possible with Special Pages on its own because the user data would need to be stored somewhere, and Special Pages is designed for structuring and outputting data already stored in the page's own XML file, not for writing new data to it (especially using front end queries). The input data would require its own separate data structure (either text files, XML files or a MySQL database) -- that is what I'm aiming to do with my plugin, using DM Matrix and its XML database structures.

Back to Special Pages: The only other non-trivial addition that I can think would be beneficial to Special Pages is the use of the new HTML5 input fields. Particularly ones like date and datetime. As custom/special fields it would make date selection fathoms easier. In fact, it means that you wouldn't need to worry about using creDate or pubDate if you have a very specific timeline to create/replicate - you'd set up the dates/times with that custom field and use i18n search to just order by that new field thanks to mvlcek's latest update.
Reply
WOW! So science-fiction is going to be no more fiction... :-)
Looking forward for this new release and definitely I placed a bookmark on it.

To this aim, I wonder if you have considered the front-end plugin, which was originally developed by Mikeh. I think that some of your ideas are already present on it but it looks like it is no more developed since quite a while.
Actually it allows the possibility to choose if you want to store data onto XML files or in a MySql database, and this could be very important if your membership widen up to some hundreds of people.

With GS, I developed websites with hundreds of (XML)pages and they never collpased so I know that the number of pages it is not a problem for the structure of the website. However, when this number grows what is going to be a problem is the speed and a MySql database could be useful right for it.

Well, I'm sure you have already considered all of the above and then I'll just quietly waiting for your new release.
Thanks so much and keep on going with your great job.
Reply
(2013-05-14, 05:18:00)Angryboy Wrote: Define the page types by going to Plugins -> Configure I18N Special Pages (here you set up new custom/special fields to better structure your page's data), then create those pages by going to Pages -> Create New Special Page and click the desired page type. You will then have those created fields available to you for that new page. Editing pages is simply done by clicking on them from the Pages view like any other normal page.

If your problem is in understanding how to display the contents of your newly defined fields, remember that to do so you need to specify in the template where to output that field's contents (which you can do from Plugins -> Configure I18N Special Pages) like so:

Code:
<?php get_special_field('fieldname'); ?>

If you need more help, I specifically wrote some tutorials upon request earlier this year which may be helpful:

http://soaw.hostingsiteforfree.com/i18n-...s/?lang=en
http://soaw.hostingsiteforfree.com/i18n-...s/?lang=en
http://soaw.hostingsiteforfree.com/i18n-...s/?lang=en

Thank you! Your tutorial on the basic set up is all I needed to get going. This is what I meant by the official document on how to set up the plugin was lacking. Don't just say what plugins you need. Mention how they're needed as well (with regard to the official documentation).

Don't get me wrong. Love the plugin and appreciate the work put in to it. Smile
Reply
(2013-05-15, 17:56:11)GPB61 Wrote: WOW! So science-fiction is going to be no more fiction... :-)
Looking forward for this new release and definitely I placed a bookmark on it.

To this aim, I wonder if you have considered the front-end plugin, which was originally developed by Mikeh. I think that some of your ideas are already present on it but it looks like it is no more developed since quite a while.
Actually it allows the possibility to choose if you want to store data onto XML files or in a MySql database, and this could be very important if your membership widen up to some hundreds of people.

With GS, I developed websites with hundreds of (XML)pages and they never collpased so I know that the number of pages it is not a problem for the structure of the website. However, when this number grows what is going to be a problem is the speed and a MySql database could be useful right for it.

Well, I'm sure you have already considered all of the above and then I'll just quietly waiting for your new release.
Thanks so much and keep on going with your great job.

Indeed I have considered Front End Users and even tested it out a while ago back in 2011. I liked the premise of it, but was saddened to see that it no longer is supported. Had it still been supported like i18n, I might have simply used it as the hook for my subsequent plugins. Also, while developing the message board plugin, I saw it fit to separate the user signin aspect of the script so that it could be used across other services without copy-pasting code and having duplicate user tables.

(2013-05-16, 13:26:02)kolorguild Wrote: Thank you! Your tutorial on the basic set up is all I needed to get going. This is what I meant by the official document on how to set up the plugin was lacking. Don't just say what plugins you need. Mention how they're needed as well (with regard to the official documentation).

Don't get me wrong. Love the plugin and appreciate the work put in to it. Smile

Glad to have helped. :-)

The way I see it (and this could be controversial), but mvlcek didn't need to develop these plugins and provide the level of support that he does. He's a busy man that has other responsibilities, so he won't be able to be as comprehensive with usage guidelines and tutorials as he might want to be. So in the spirit of solidarity, those with the knowledge of how to use his plugins should offer their guidance, because it's the least that we can do to offer our assistance (besides beta testing). This goes for any developer on the GetSimple project - we're all here essentially doing volunteer programming and software support, so we should all offer a hand to help each other where possible.
Reply
why tags do not work?
Code:
<?php get_special_tags('search', ' ,', true); ?>
Reply
(2013-05-20, 22:40:36)Oleg06 Wrote: why tags do not work?
Code:
<?php get_special_tags('search', ' ,', true); ?>
http://business-website.ru/pandus/novosti/
http://business-website.ru/pandus/search...ая+новость

Works for me. It only works, if the current page is a special page - then you can include it in the view code of the special page or in the template.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
so my code looks like in the settings of Special Pages
Code:
<div class="post">
        <div class="post-img picture"><a href="<?php get_special_field('image','-',false); ?>" rel="image"><?php get_special_field_image('image', 'Пандусы для колясок'); ?><div class="image-overlay-link"></div></a></div>
<a href="#" class="post-icon standard"></a>
        <div class="post-content">
            <div class="post-title"><h2><a href="<?php get_special_field('simplelink','',false); ?>"><?php get_special_field('title','',false); ?></a></h2></div>
            <div class="post-meta">
<span><i class="mini-ico-calendar"></i><?php get_special_field_date('pubDate', '%d.%m.%Y'); ?></span>
<span><i class="mini-ico-user"></i>Автор <b style="text-transform:uppercase;"><?php get_special_field('user','',false); ?></b></span> <span><i class="mini-ico-tag"></i>Теги: <?php get_special_tags('search', ' ,', true); ?></span></div>
            <div class="post-description">
                <?php get_special_field_excerpt('content', $numWords); ?>
            </div>
            <a class="post-entry" href="<?php get_special_field('simplelink','',false); ?>">Продолжить чтение</a>
        </div>
    </div>
вторая+новость
before it would be so
вторая_новость
it works
code in the page search
Code:
(% searchresults max:5 order:created showPaging:1 numWords:50 HEADER="" %)
the result of the tag cloud
Reply
Angryboy, can you look the error of this plugin
Reply




Users browsing this thread: 4 Guest(s)