Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I18N Special Pages
odd, do your pages all have special tags on them also ?
special pages should only be applied to pages created as special pages.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
I'm not sure I understand what you ask with "do your pages all have special tags on them also" ?
Français et éternel débutant
French and eternal beginner
Reply
I believe special pages have a tag on the pages with _special or something
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
I18N Special Pages version 1.3.1:
  • fixes some severe bugs of the last update, when creating a new special pages type (@Oleg06, @krysttof)
  • correctly handles slug updates for multi-language sites, when the slug pattern was changed for the special page.
  • correctly handles undos of special page type changes.
  • removes special page flag and _special_xxx tag from pages, when a special page type is deleted - this is not undoable (@krysttof - delete a special page type to reset all those pages to normal)
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
@mvlcek, I just tested the update 1.3.1, my problem is solved.
Thank's
Smile
Français et éternel débutant
French and eternal beginner
Reply
yes, page ceased to be removed while maintaining the type of special pages Smile
Reply
Hi you wonderful 'Special Pages' users. I've just discovered I18N Special Pages and I´m about to build as a kind of automatically generated teaser overview page.
It's working fine so far. In search results I´m using

PHP Code:
php get_special_field_image('bild'$title=null'150''100','1'); ?>

The picture comes out perfectly. But the image is integrated in some html which should only be there when there is a picture uploaded in special_field 'bild' and should not be in the page when the field doesn#t contain a picture.

As you can see I'm a php loser:
PHP Code:
<?php
if ('bild') {
 echo 
"<figure><picture>";
get_special_field_image('bild'$title=null'150''100','1');
echo 
"</picture></figure>";
}
?>

but the html comes out even when there is no picture.

I'm very excited about your answers. Thanks a lot!
Reply
use standard get_special_field and add html markup only if the field is not empty

but this looks like a small bug, mvlcek ?
Reply
Thanks for your quick replie! Well, I think this wouldn't work. Actually it should start like this or something:
PHP Code:
<?php
if (!empty($bild)) .. 
But there is no variable 'bild', when you create a special_pages_field 'bild' for image upload.
Reply
Maybe with
Code:
if (return_special_field('bild',false)) {
Reply
Hi Carlos,
it works!
Thank you very much.
Reply
Hi mvlcek,

There is a bug in 1.3.1 version. There is a problem with new functionality that handles slug updates when you change slug in special page configuration.

After that page files are updated but data/other/pages.xml file is not updated so global $pagesArray has old data with old url's.

To fix it in i18n_specialpages/backend.class.php after line 330 add new line with this:
PHP Code:
create_pagesxml(true); //regenerate cache 
http://flexphperia.net - my portfolio
Reply
Hello!

Is it possible to skip first several items in the search results?
So, lets say I want to call two news items somewhere on the page by setting "max=>2" and in some other place I need to call next three news items... is there a parameter which can "skip" the first two news items, when I call them second time?

this is the type of code I'm using to call news:
Code:
<?php get_i18n_search_results(array('tags'=>'news', 'DATE_FORMAT'=>'%d %B, %Y', 'max'=>2, 'i18n'=>0, 'lang'=>'ru', 'numWords'=>'1p', 'order'=>'created', 'showPaging'=>0, 'HEADER'=>'')); ?>



I hope I could explain the idea.. Thank you!
Reply
(2014-06-24, 01:18:08)0zz Wrote: Hello!

Is it possible to skip first several items in the search results?
So, lets say I want to call two news items somewhere on the page by setting "max=>2" and in some other place I need to call next three news items... is there a parameter which can "skip" the first two news items, when I call them second time?

this is the type of code I'm using to call news:
Code:
<?php get_i18n_search_results(array('tags'=>'news', 'DATE_FORMAT'=>'%d %B, %Y', 'max'=>2, 'i18n'=>0, 'lang'=>'ru', 'numWords'=>'1p', 'order'=>'created', 'showPaging'=>0, 'HEADER'=>'')); ?>

I hope I could explain the idea.. Thank you!

There is no such skip parameter, but it can be simulated by the (undocumented) process parameter (not tested):
Code:
<?php
function skip($results, $parameter) {
  return array_slice($results, $parameter);
}
get_i18n_search_results(array('tags'=>'news', 'DATE_FORMAT'=>'%d %B, %Y', 'max'=>2, 'i18n'=>0, 'lang'=>'ru', 'numWords'=>'1p', 'order'=>'created', 'showPaging'=>0, 'HEADER'=>'', 'process'=>'skip', 'parameter'=>2));
?>

BTW: this is the wrong forum thread.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
wow!! this piece of code does magic!!!
Thank you very much for immediate reply!
Reply
I would love to see a date and time picker option under custom field types.

However, the result would be just static text, right? It couldn't be made to work like a future moment to publish the page on setting?
Reply
I am looking to show searchers what page category a search result belongs to. In doing so, I tried to display the name of a search result's parent page as part of the daughter page's results snippet.

However, GS does not seem to have a function that retrieves the title of a page's parent. And even if it did, it would likely put out the parent title of the search results page itself, rather than of the search result.

Within the i18n special pages plugin there also appears to not be a way to put out the parent's title. Now that I think of it, an adaptation of the

get_i18n_breadcrumbs(return_page_slug());

function for search results seems ideal.
Reply
(2014-07-13, 22:13:39)danielg Wrote: ...
However, GS does not seem to have a function that retrieves the title of a page's parent. And even if it did, it would likely put out the parent title of the search results page itself, rather than of the search result.
...

See [url]http://get-simple.info/wiki/config:caching-function[url], echoPageField(theParentSlug, 'title') should do it.

@shawn_a: I think this should (also) be included on the templates function wiki page.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
anyone can add it.... Smile
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
Quote:See [url]http://get-simple.info/wiki/config:caching-function[url], echoPageField(theParentSlug, 'title') should do it.

That didn't output anything for me when set up under Plugins -> Special Pages -> Configure i18n special pages -> search.

And my search results do have parent pages.
Reply
Am I missing something or is it not possible to upload an image with the image custom field?

It seems the user has to leave the post being created to switch to the files tab, upload an image there, then go back to the pages tab to select it there...

It look the same in the i18n custom fields plugin.
Reply
is it possible to record the tag of the plugin Special Pages in the component for rendering?
Code:
<?php get_special_field_image('name', 'title', 'width', 'height'); ?>
Reply
(2014-07-31, 17:59:45)Oleg06 Wrote: is it possible to record the tag of the plugin Special Pages in the component for rendering?
Code:
<?php get_special_field_image('name', 'title', 'width', 'height'); ?>

I do not understand, what you would like to do.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
for rendering I use this code
Code:
<h3 class="search-entry-title">
  <a href="<?php echo $item->link; ?>" title="<?php echo htmlspecialchars($item->title, ENT_NOQUOTES); ?>">
    <?php echo htmlspecialchars($item->title, ENT_NOQUOTES); ?>
  </a>
</h3>
<div class="row">
    <div class="col-4">
<figure><img src="<?php echo $item->image; ?>" title="<?php echo htmlspecialchars($item->title, ENT_NOQUOTES); ?>" alt="<?php echo htmlspecialchars($item->title, ENT_NOQUOTES); ?>" /><figcaption class="ln"><a class="zoom" href="<?php echo $item->image; ?>" title="<?php echo htmlspecialchars($item->title, ENT_NOQUOTES); ?>" rel="fancybox-project-page"><i class="fa fa-search-plus"></i></a></figcaption></figure></div>
    <div class="col-8">
        <div class="search-entry-excerpt">
           <?php echo $item->getExcerpt($item->content, $numWords); ?>
           <p class="text-right"><a class="button small color" href="<?php echo $item->link; ?>" title="<?php echo htmlspecialchars($item->title, ENT_NOQUOTES); ?>"><?php echo htmlspecialchars($item->linktext, ENT_NOQUOTES); ?></a></p>
        </div>
    </div>
</div>
is it possible to use such code
Code:
<?php get_special_field_image('image', 'title', '480', '320'); ?>

instead
Code:
<img src="<?php echo $item->image; ?>" title="<?php echo htmlspecialchars($item->title, ENT_NOQUOTES); ?>" alt="<?php echo htmlspecialchars($item->title, ENT_NOQUOTES); ?>" />

(2014-08-01, 01:41:11)mvlcek Wrote:
(2014-07-31, 17:59:45)Oleg06 Wrote: is it possible to record the tag of the plugin Special Pages in the component for rendering?
Code:
<?php get_special_field_image('name', 'title', 'width', 'height'); ?>

I do not understand, what you would like to do.
Reply
Why not just make your own function to do that, you already pretty much have.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 2 Guest(s)