Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I18N Special Pages
#51
I'm using 3.1, and SP 0.8.1; but still no images in special wysiwyg; should i enable sitewide cookies even if i'm using 3.1?

--
the tags function is working to display the tags, but is there a way to not display the _special_news tag?
and is there a way to make the tags be links to the results of a search on that tag?

--
got the dates all sorted now;

--
one more thing - i want to display a list of recent news articles (special pages) in a sidebar, but i need to use a different layout to the one that is specified in the search display for the special page; so the news page shows a specific layout (title, meta, teaser image, teaser text, read more button etc..) but the sidebar list should only show the title and the date..

http://dev.inbalancetaichi.com/news/

thanks again for your help....this news template for special pages is going to be good when it's done, so i'll share that on the special pages templates topic..i'm also almost done with a discography template...

-marc
Reply
#52
alienee2 Wrote:I'm using 3.1, and SP 0.8.1; but still no images in special wysiwyg; should i enable sitewide cookies even if i'm using 3.1?

I've no idea, unless your website base url in your settings is different then the URL you log in with (e.g. missing www.


alienee2 Wrote:the tags function is working to display the tags, but is there a way to not display the _special_news tag?
and is there a way to make the tags be links to the results of a search on that tag?

You can check and display anything with PHP ;-), approximately like that:
Code:
<?php
$tags = return_special_field('tags');
foreach ($tags as $tag) {
  if (substr($tag,0,1) != '_') {
    $link = find_url('your-search-page').'?tags='.urlencode($tag); // you might want to add the _special_xxx tag
    echo '<a href="'.htmlspecialchars($link).'">'.htmlspecialchars($tag).'</a> ';
  }
}
?>

alienee2 Wrote:one more thing - i want to display a list of recent news articles (special pages) in a sidebar, but i need to use a different layout to the one that is specified in the search display for the special page; so the news page shows a specific layout (title, meta, teaser image, teaser text, read more button etc..) but the sidebar list should only show the title and the date..

use the component parameter of I18N Search, see here.

alienee2 Wrote:thanks again for your help....this news template for special pages is going to be good when it's done, so i'll share that on the special pages templates topic..i'm also almost done with a discography template...

Great!
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#53
mvlcek Wrote:You can check and display anything with PHP ;-), approximately like that:
Code:
<?php
$tags = return_special_field('tags');
foreach ($tags as $tag) {
  if (substr($tag,0,1) != '_') {
    $link = find_url('your-search-page').'?tags='.urlencode($tag); // you might want to add the _special_xxx tag
    echo '<a href="'.htmlspecialchars($link).'">'.htmlspecialchars($tag).'</a> ';
  }
}
?>
I've been waiting forever to find out how to do this :-D Thank you once more, mvlcek!
Reply
#54
Angryboy Wrote:
mvlcek Wrote:You can check and display anything with PHP ;-), approximately like that:
Code:
<?php
$tags = return_special_field('tags');
foreach ($tags as $tag) {
  if (substr($tag,0,1) != '_') {
    $link = find_url('your-search-page').'?tags='.urlencode($tag); // you might want to add the _special_xxx tag
    echo '<a href="'.htmlspecialchars($link).'">'.htmlspecialchars($tag).'</a> ';
  }
}
?>
I've been waiting forever to find out how to do this :-D Thank you once more, mvlcek!

You can also strip the array with array_filter() if you want it intact for use later on.

Code:
psuedocode
$filtered_tags = array_filter( return_special_field('tags'), function ($tag) { return (substr($tag,0,1) != '_'); });
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#55
This is great; i'm almost there with this special news template; The project is here:
http://dev.inbalancetaichi.com/news/
this is using the special pages to render the news listing, sidebar and detail;

for the sidebar display of the recent news items, i am using this in my template sidebar:

Code:
<?php get_i18n_search_results(array('tags'=>'_special_news','component'=>'side-news','max'=>4,'HEADER'=>' ')); ?>
but the result listing is showing paging at the bottom, so i would like to be able to disable that;

This is the custom component for rendering the sidebar news listing:

Code:
<div>
  <a href="<?php echo $item->link; ?>"> <?php echo htmlspecialchars($item->title, ENT_NOQUOTES); ?></a><br />
  <span><?php echo strftime($dateFormat, $item->pubDate); ?> </span>
  </div>

Here I can't figure out how to specify the date formatting withing the php code for the search results; i see that there is a variable $dateFormat in the component, but how/where would i specify the date format in this case.

Thanks again for the assistance!

-marc
Reply
#56
alienee2 Wrote:for the sidebar display of the recent news items, i am using this in my template sidebar:

Code:
<?php get_i18n_search_results(array('tags'=>'_special_news','component'=>'side-news','max'=>4,'HEADER'=>' ')); ?>
but the result listing is showing paging at the bottom, so i would like to be able to disable that;

Remove the 'max'=>4.

alienee2 Wrote:This is the custom component for rendering the sidebar news listing:

Code:
...
<?php echo strftime($dateFormat, $item->pubDate); ?>
...

Here I can't figure out how to specify the date formatting withing the php code for the search results; i see that there is a variable $dateFormat in the component, but how/where would i specify the date format in this case.

Either add 'DATE_FORMAT'=>'%A, %d.%m.%Y' or similar to the get_i18n_search_results call or just replace the variable $dateFormat directly with the format string, e.g. '%A, %d.%m.%Y'.

If you go to Plugins/Configure I18N Search, you will see all possible parameters with explanations.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#57
Remove the 'max'=>4.

ok, but what if you only want 4 items to show, and no paging?

thanks again,

-marc
Reply
#58
alienee2 Wrote:Remove the 'max'=>4.

ok, but what if you only want 4 items to show, and no paging?

Then leave 'max'=>4 and add 'showPaging'=>0.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#59
mvlcek Wrote:
alienee2 Wrote:Remove the 'max'=>4.

ok, but what if you only want 4 items to show, and no paging?

Then leave 'max'=>4 and add 'showPaging'=>0.

OK - right; got that now and am seeing the usage page and how to implement those options..

thanks again..

-marc
Reply
#60
Hi,

Seem to be having a few issues with this in that I cannot add images via the WYSIWYG area of any Special Pages that I create. Have tried on a local server and a remote server and everytime I go to add an image it brings up the requester and I can browse ther server but when I click on an image to add it returns to the browse requester but has not filled in any details.

Any pointers much appreciated.

Regards

Stu
Reply
#61
srsdesign Wrote:Hi,

Seem to be having a few issues with this in that I cannot add images via the WYSIWYG area of any Special Pages that I create. Have tried on a local server and a remote server and everytime I go to add an image it brings up the requester and I can browse ther server but when I click on an image to add it returns to the browse requester but has not filled in any details.

Any pointers much appreciated.

Regards

Stu

Hi Stu, I am having the same problem and not sure how to fix it; but in the meantime you could just select the image in the main editor and then copy the code into the special WYSIWYG area..

-marc
Reply
#62
alienee2 Wrote:
srsdesign Wrote:Hi,

Seem to be having a few issues with this in that I cannot add images via the WYSIWYG area of any Special Pages that I create. Have tried on a local server and a remote server and everytime I go to add an image it brings up the requester and I can browse ther server but when I click on an image to add it returns to the browse requester but has not filled in any details.

Any pointers much appreciated.

Regards

Stu

Hi Stu, I am having the same problem and not sure how to fix it; but in the meantime you could just select the image in the main editor and then copy the code into the special WYSIWYG area..

-marc

Hi Mark,

That's what I have had to do for now although I'm in the middle of building a 150 page site and it's not ideal. Have tried completely fresh installs of both latest versions of GS and Special Pages and different browsers and still the same issue. Surely there are others who are having the same issue or am I just doing something stupidly wrong!

Stu
Reply
#63
srsdesign Wrote:Seem to be having a few issues with this in that I cannot add images via the WYSIWYG area of any Special Pages that I create. Have tried on a local server and a remote server and everytime I go to add an image it brings up the requester and I can browse ther server but when I click on an image to add it returns to the browse requester but has not filled in any details.

Yes, this seems to be a problem on GetSimple 3.1.
I'll look into it.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#64
mvlcek Wrote:
srsdesign Wrote:Seem to be having a few issues with this in that I cannot add images via the WYSIWYG area of any Special Pages that I create. Have tried on a local server and a remote server and everytime I go to add an image it brings up the requester and I can browse ther server but when I click on an image to add it returns to the browse requester but has not filled in any details.

Yes, this seems to be a problem on GetSimple 3.1.
I'll look into it.

Many thanks mvlcek!

Been pulling my hair out. Also I seem to be having an issue with using template files for special pages in that no matter what I select for the template file it seems to resort in using the default template.php file. Might be just me doing something wrong?

Thanks again

Stu
Reply
#65
Hello!
How do I determine if my desired page is a special page of 'product' type? Is there are somthing like return_special_page_name()? I want to output social buttons only on 'product' pages. Thanks!
Reply
#66
jas0n Wrote:Hello!
How do I determine if my desired page is a special page of 'product' type? Is there are somthing like return_special_page_name()? I want to output social buttons only on 'product' pages. Thanks!

Code:
<?php if (return_special_field('special') == 'product') { ... } ?>
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#67
I18N Special Pages version 0.9:
  • search results will now use the defined formatting on the index page, too
  • new function get_special_page_type() to get the page type (@jas0n)
  • new function get_special_tags($slug=null, $separator=' ', $all=false) will output the tags of the special page. If $slug is given (should be the slug of a page to display search results), links to the search are generated. Set $all to true, if you want all search results instead of only pages of the same special page type (@alienee2, @Angryboy).
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#68
mvlcek Wrote:I18N Special Pages version 0.9:
  • search results will now use the defined formatting on the index page, too
  • new function get_special_page_type() to get the page type (@jas0n)
  • new function get_special_tags($slug=null, $separator=' ', $all=false) will output the tags of the special page. If $slug is given (should be the slug of a page to display search results), links to the search are generated. Set $all to true, if you want all search results instead of only pages of the same special page type (@alienee2, @Angryboy).

Great ! thanks mvlcek... this is really incredible...opens a world of possibilities...
-marc
Reply
#69
Christ dude. You keep updating this thing with even better additions that I don't know if I should just wait till you hit Special Pages 1.0 to do the tutorial in full. Each time I come back here there's something even cooler about this plugin that I want to mention. Thanks again :-)
Reply
#70
Angryboy Wrote:Christ dude. You keep updating this thing with even better additions that I don't know if I should just wait till you hit Special Pages 1.0 to do the tutorial in full. Each time I come back here there's something even cooler about this plugin that I want to mention. Thanks again :-)

I'm just adding features that are based on your and other users' questions and suggestions.
So I have to thank you, too, as your posts make it easier to improve the plugin :-)
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#71
mvlcek Wrote:
Angryboy Wrote:Christ dude. You keep updating this thing with even better additions that I don't know if I should just wait till you hit Special Pages 1.0 to do the tutorial in full. Each time I come back here there's something even cooler about this plugin that I want to mention. Thanks again :-)

I'm just adding features that are based on your and other users' questions and suggestions.
So I have to thank you, too, as your posts make it easier to improve the plugin :-)
:-) I am honoured.

As for improvements, there is nothing that the plugin 'needs' per-say at the moment. It provides everything and more, with any bugs having been ironed out by your latest iterations. My suggestions from here on aren't things that are needed, but functions that I think might be cool to consider if they are feasible (and if you have the time/desire, of course).

'Apply to all Pages of this type'
If one has many pages but later decides to reconfigure the Special Page type (under GENERAL and FIELDS), the user needs to go and re-save every page once more. This is probably an infeasible suggestion, but is it possible that certain fields throughout the configuration panel have an 'Apply to all Pages' button that overwrites that field with the new default content for all of the pages of that type?
Example: A user has 30 pages (under the Special Page 'product') with the template 'product.php', but then decides that they want to change all 30 pages to have the default template. If that field had an 'Apply to all?' button, it would save them needing to edit every product page again to feature the changed template.

Custom field resizing
To save you needing to code the dimensions of each field yourself, is it possible for users to define the sizes of the fields?
Example: A user has the fields 'Height', 'Width', 'Depth' and 'Material'. Currently these fields would spill onto two separate lines, each with two fields. But the user might feel that it is best that they all fit onto 1 line, with the four fields each having a much smaller size than usual. This would prevent you needing to fix the field widths with any upcoming GetSimple iterations because the users will be able to fix them themselves.

As always, keep up the good work (and actually get some rest for once! You work too hard).
Reply
#72
French language for I18N Special Pages available in Extend
Reply
#73
How to make a translation of special pages?
I created a special page "News". I added a "news item" in Polish, and I want to translate into English.
When I click "plus button" to create a page in English it does not add the "_en" in the "Tags & Keywords" . I can not add it manually. After saving the page is added to the Polish language.
GS3.1,
I18N Version 2.6
I18N Search Version 2.6
I18N Special Pages Version 0.9
Reply
#74
MarioSimple Wrote:How to make a translation of special pages?
I created a special page "News". I added a "news item" in Polish, and I want to translate into English.
When I click "plus button" to create a page in English it does not add the "_en" in the "Tags & Keywords" . I can not add it manually. After saving the page is added to the Polish language.

Congratulations, you found a bug ;-)
It's fixed in I18N Special Pages version 0.9.1.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#75
I cannot get the SP plugin to index the custom fields that I have setup. I have installed, I18N Search v2.6, I18n Base v2.6, I18N Navigation v2.6 and I18N Special Pages v0.9.1.

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>.

Any idea of why these fields are not indexed? If you need more info I can/will provide it.

Update:
I installed GS3.1 to see if it would make any difference. No change. I also turned on debug, and whenever I save any page I get the following error messge
Quote:Warning: SimpleXMLElement::asXML(/home/public/sitemap.xml) [simplexmlelement.asxml]: failed to open stream: Permission denied in /home/public/admin/inc/basic.php on line 273

Though my pages do update and everything works on the frontend
Reply




Users browsing this thread: 2 Guest(s)
Free HDTV Channels Residential Solar Panels