Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I18N Special Pages
#76
jay_m Wrote:I created a Special Page with the Index box checked on desired fields. Whenever I try to search for these fields as a tag nothing comes up. I searched in i18n_tag_index.txt for these fields and they do not show up. I check in the xml file for the SP and the fields are marked with <index>1</index>.

These fields are indexed with their individual words, so they should show up in the word index. You have to search with words=...
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#77
Quote:These fields are indexed with their individual words, so they should show up in the word index. You have to search with words=...

Ahhh....ok, well that works : )

I am trying to use the Special Pages to create Items for a Product List. I am trying to apply several Categories to an item then narrow down the results based on the Menu level. ie...

Services
-Commercial
-Repair
-Onsite
-Offsite
-Maintenance
-Onsite
-Offsite
-Residential
-Repair
-Onsite
-Offsite
-Maintenance
-Onsite
-Offsite

So that if I am on "Commercial" I can see all items that have the commercial category selected. If I am in Commercial/Repair, I only see the items that match Commercial and Repair. Then If am in Commercial/Repair/Onsite, I only see item that match Commercial, Repair and Onsite.

Searching with "words=" it will match every page that is indexed and has those words anywhere on them, which I do not want. I am using the "tags=_special_services" to only match the "services" SP. But it will still match other _special_services pages that have those search terms in the text.

Also the search seems to be an "OR" method and I need it to match the phrase with an "AND" to exclude pages that do not match all the search terms.

Is it possible to configure a search like this using the plugin or do I need to do this in PHP.
Reply
#78
jay_m Wrote:I am trying to use the Special Pages to create Items for a Product List. I am trying to apply several Categories to an item then narrow down the results based on the Menu level. ie...

Just enter the categories as tags/keywords, e.g. Services, Commercial, Repair, Onsite (and _special_services, which is added automatically). You can search with tags="Commercial Repair" or similar (it's AND).

In addition to the hierarchical menu, you can also allow the user to search within services:
Code:
(% searchform addtags=_special_services %)
(% searchresults addtags=_special_services %)
If the user has Javascript turned on, he can then click on tags and all tags are grayed out, if there is would be no search result, if they are added. Effectively this would work like the menu, but the user can click on the tags in any order. If you add live=1 to the calls, the user will immediately see the results.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#79
Thanks for the fast response!

I was hoping that there would be a way to use the Special Page fields as searchable Tags. It would make it much easier to use as an Items listing plugin. That way it wouldn't be necessary to choose the category field and also enter the same information in the Tags list.

I am not a php coder, just a hacker, so I don't know how hard it would be to implement this, or feasible. Also I didn't pay a dime to use it so I am not a complainer ; )
Reply
#80
I18N Special Pages version 1.0:
  • fixes some small inconsistencies in the configuration
  • adds the option to index a text field's or dropdown box's content as tag (thanks @jay_m for the idea)

Indexing a field as tag allows you to specify a dropdown of categories where the selected category is automatically added as (virtual) tag in the search index and thus is selectable in the tag cloud.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#81
Freeeking Awesome!

It works like a champ.

Here is my search, just for reference
Code:
(% searchresults tags="_special_services residential repair onsite" order:url HEADER:' ' %)
Reply
#82
Is there a way to put "previous" and "next" page links on the special pages?
Reply
#83
The slug text box is missing?
Reply
#84
jay_m Wrote:The slug text box is missing?

If you enter a pattern for the slug in the special pages settings, it is automatically filled and hidden - this is for news or blog entries, where you have a generic name with date and time.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#85
Dominic Wrote:Is there a way to put "previous" and "next" page links on the special pages?

Previous and next search result?
No, currently not.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#86
mvlcek Wrote:If you enter a pattern for the slug in the special pages settings, it is automatically filled and hidden - this is for news or blog entries, where you have a generic name with date and time.

Got it, makes sense. Would it be possible/feasible to use the custom fields as part of the slug pattern. Again for a product listing, you could have one parent page, say Inventory, then setup a custom field, say Part Number, to automatically name/order the page.

Edit:
I also noticed that if you change the template for a special page type, it does not get updated for the pages with out resaving each special page.
Reply
#87
jay_m Wrote:I also noticed that if you change the template for a special page type, it does not get updated for the pages with out resaving each special page.

The slug pattern, parent, etc. and the default field values are just defaults for when the page is created.
I would be quite hard/impossible to decide if to replace the current value or not, when the definition changes.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#88
*edit* Solved the bulk of my problem by using components instead, so never mind that.

Nevertheless, would it be possible to have a "HTML/PHP code for the header of the page" field for the search results page? It would save the need for using an embedded CSS sheet which would be echoed as many times as the results outputted on the page.
Reply
#89
mvlcek Wrote:
jkob Wrote:Aaaahh great! It works now - my mistake was to add <?php get_special_field('myfield'); ?> directly in the template.php file, when I used the View tab instead it worked.

Fantastic plugin, thank you Smile

Fine that it works for you now. But it should also work directly in the template, if the current page is a "special" page with this field set.

how to get it work in normal pages...(current page is NOT "special")?
I want to have special pages as childpages of a normal page. with "normal" childpages inside a parent page i can call each content of the childpages via getChildren, which works fine...but "special" childpages only show the title and content...

SOLVED:

getPageField($childcontent, 'specialfield');

does the trick... (specialfied = name of a certain special field)
Reply
#90
Hi all
I have a problem.
I have a multi-language site which uses 3 languages
I created /News/ special page from template with content pages in 3 language versions.
But in main page News are not separated by language but there are all 3 language versions together.
(Navigation and Search works fine)
What am I doing wrong? Or what I forgot?
Thanks
Reply
#91
mannonero Wrote:Hi all
I have a problem.
I have a multi-language site which uses 3 languages
I created /News/ special page from template with content pages in 3 language versions.
But in main page News are not separated by language but there are all 3 language versions together.
(Navigation and Search works fine)

I don't understand what you mean with "News on main page".
If you display them as search result and want to only show those in one language, you have to include the parameter lang in the search, i.e. on the german main page:
Code:
(% searchresults tags=_special_news lang=de %)
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#92
mvlcek Wrote:
mannonero Wrote:Hi all
I have a problem.
I have a multi-language site which uses 3 languages
I created /News/ special page from template with content pages in 3 language versions.
But in main page News are not separated by language but there are all 3 language versions together.
(Navigation and Search works fine)

I don't understand what you mean with "News on main page".
If you display them as search result and want to only show those in one language, you have to include the parameter lang in the search, i.e. on the german main page:
Code:
(% searchresults tags=_special_news lang=de %)
YES it helped. Thank You Mr. Vlcek Smile
Reply
#93
I don't know which i18n plugin is causing this, but when I save a page, the creDate field is overwritten and filled with the same date as the pubDate field. This means that I can't really order search results by their actual creation date. Is there a bug or have I misconfigured something?
Reply
#94
An update to the problem: it is a conflict between I18N CustomFields and I18N Special Pages. I tried removing CustomFields to get around it, but that ends up breaking many of my pages and stops displaying the content. Still not worked out a solution as of yet.

*edit* It is definitely something about having CustomFields and Special Pages. When I disable CustomFields, the creDate field is left untouched as it should be, but the content of my Special Pages stop being displayed properly. When I renable CustomFields, my content is displayed properly, but the creDate field simply takes the value of the pubDate field, making it entirely useless.

*edit 2* I've realised why my fields weren't displaying (hadn't transfered the template correctly to say special_field instead of custom_field, so I can delete CustomFields safely now. Hopefully this fixes the pubDate/creDate issue. Still, a very helpful feature would be to fix the template files for all of a special page type with one button (one I suggested before), since I now have to edit the xml files of over 50 files xD
Reply
#95
Re: Portfolio, Special Page Type

I'm creating a new special page type for a portfolio which has a pretty photo search results page; in order to get this to work, i somehow need an incrementing value in my output..but i've been having some difficulty with the code for it; any help or suggestions for that would be great!

this is the code, and where it says "id-1", that needs to be an incrementing number..

Code:
<li data-id="id-1"  class="<?php get_special_field('pocategory'); ?>">     <a href="<?php get_special_field('thlink'); ?>"  <?php if (return_special_field('threl')) { ?> rel="<?php get_special_field('threl'); ?>"  <?php } ?>  title=""> <img src="<?php get_special_field('pothumbnail'); ?>"  alt="" /></a> </li>

the other thing i'm trying to figure out is how to display my search results without the default <ul> and <li> tags;
Code:
<ul  class="search-results ">
  <li class="search-entry ">

for example, if i am going to have specific classes that need to be in the <ul> and <li> tags, in order to get the output to work correctly; is there some way to override the default output in my template functions.php file, for i18n search results...

and i'm still having an issue with 403 errors when using the image or link browser in special pages.

Thanks!

-marc

Edit: I'm now using the page slug for the id and it seems to work (since they are unique..) so i probably won't need the increment function...
Reply
#96
Hi there,

I have started using the special pages plugin. The possibilities that this plugin brings are very interesting, and I look forward to start making extensive use of it. Although I will need to dive into it further before I can really start creating my own special pages.

In the meantime I have just implemented Angryboy's i18n-news template, as I need a multi-lingual newspage on the site I am working. Kudos on the template and your tutorial Angryboy!

One question though:
The site I am working on has 3 languages: dutch, german and english. With the default language being dutch. As such when I create a news item the first version created will be dutch, using the little plus sign that the i18n plugin offers it is easy to create german and english versions where only the title needs to changed and the text needs to be filled.

However, lets say I want to create just a german news item? Is there an easier way to accomplish this aside from filling in the slug myself with an added _de while creating the news item?

And if so, how to tackle this exactly?
Reply
#97
Draxeiro Wrote:However, lets say I want to create just a german news item? Is there an easier way to accomplish this aside from filling in the slug myself with an added _de while creating the news item?

And if so, how to tackle this exactly?

I think that currently there might be some problems if you don't have a page version in the default language (navigation, search). And there is currently no other way to create such pages.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#98
mvlcek Wrote:
Draxeiro Wrote:However, lets say I want to create just a german news item? Is there an easier way to accomplish this aside from filling in the slug myself with an added _de while creating the news item?

And if so, how to tackle this exactly?

I think that currently there might be some problems if you don't have a page version in the default language (navigation, search). And there is currently no other way to create such pages.

Would this maybe be a nice addition to your i18n plugin? Enabling a pulldown box to select for which language version the page in question is meant, after which the plugin adds the _de, _en, _fr, etc to the slug.

Would solve this both for regular pages as well as special pages I think.
Reply
#99
Re: Request for "placeholder" attribute on search form input

I would like to make a feature request for i18n Search, to add a placeholder attribute to the input field, which would default to empty, but could be specified when calling the search form.

this is what i changed in searchform.php to get it working:
Code:
<input type="text" name="words" value="<?php echo htmlspecialchars(@$_REQUEST['words']); ?>"  placeholder="type search and hit enter" />

Maybe it could be integrated something like this:
Code:
<?php get_i18n_search_form(array('slug'=>'search','showTags'=>0, 'placeholder'=>'type search and hit enter')); ?>

http://www.w3schools.com/html5/att_input...holder.asp

-marc
Reply
Does every special page have to have a parent?
The interface says:
Quote:If you leave the parent page empty, it must be selected when creating a page

So does this mean you can't have a special page as a top level page? For instance, can you have the website home page be a special page?
Reply




Users browsing this thread: 15 Guest(s)