7Jun/1017
sfSimpleGoogleSitemapPlugin
Just a thread where people can leave comments/discuss about sfSimpleGoogleSitemapPlugin, a Symfony plugin that I originally wrote more than a year ago.
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.
January 14th, 2011 - 01:14
Hi,
Thanks for this plugin.
I am wondering how to deal with the sf_culture, if I want to do a multilanguage site.
regards
Olivier
January 14th, 2011 - 01:17
Hi,
I noticed something else. I am using routes that are based only on one word (no module, no action), unfortunately the plugin force me to provide an action and a module, if a route can be specified it could be great.
regards
Olivier
January 14th, 2011 - 01:24
You can use routing, check the readme under ‘Configuration’ section … if you use routing url (like: @myroute), the plugin should ignore the module and action
January 14th, 2011 - 01:27
You might need to extend the plugin for the sf_culture.
March 29th, 2011 - 12:39
Hi,
First of all thanks for this plugin, it’s helping me a lot.
I’m Trying to filter de records but I got two issues:
1st: I like to filter by the result of the function “notPublished” that is check the object and related objects (instead one single column). Is it possible to ignore the column field and check the function for every object?:
– { column: block, method: notPublished, operator: = , value: 0 }
2nd: How can I set a dynamic value for a criteria. I need to check that the finish date is greater than current date:
– { column: finish, method: getFinish, operator: > , value: now() }
Anyway this second question is not required once the fist is solved.
Thanks!!
March 30th, 2011 - 10:05
Hi Miguel,
Sorry, at the moment they are not possible with the plugin. Currently the plugin just passes the criterias to either Doctrine, Propel or DbFinder.
I’ll have to work on adding those extra functionalities, but I’m currently very busy with work.
If you happen to add those functionalities, let me know and I’ll add it to the plugin so other people can use it.
Cheers
March 31st, 2011 - 09:38
I’ll work on it!!
Again, thanks for this plugin.
Cheers
April 5th, 2011 - 02:35
I’ve made some modifications, they worked for me (and surely there would be a cleaner way to get this). They just check the “method” indicated in the criteria when the “column” is not set. I modified sfSimpleGoogleSitemap.class.php
To ignore those criterias without column just added one line to queryUsingPropel method:
= if ($criteria_array and is_array($criteria_array))
= {
= foreach ($criteria_array as $crit)
= {
+ if (!isset($crit['column']) || $crit['column']==”) continue;
To execute the method indicated in the criteria I added the following lines to processConfig() method:
= // if there’s any result
= if ($objects and (is_array($objects) or ( $orm == self::ORM_DOCTRINE and $objects instanceof Doctrine_Collection )))
= {
= foreach ($objects as $obj)
= {
+ if ($criteria_array and is_array($criteria_array))
+ {
+ $ignore_object = false;
+ foreach ($criteria_array as $crit)
+ {
+ if (isset($crit['column']) && $crit['column']!=”) continue;
+ $operator = ($crit['operator']==’='?’==’:$crit['operator']);
+ $value = $crit['value'];
+ $method = $crit['method'];
+ if (!eval(‘return ‘.($obj->$method()?’1′:’0′).$operator.$value.’;'))
+ {
+ $ignore_object = true;
+ break;
+ }
+ }
+ if ($ignore_object)
+ continue;
+ }
Sorry I have not added this functionalities to DbFinder or Doctrine.
Hope It’s useful.
April 15th, 2011 - 23:23
Hi!
I am using your plugin sfSimpleGoogleSitemapPlugin and I found one small
issue which is quite small and really easy to fix. I have multicultural
environment and I need to extend sfSimpleGoogleSitemap and redefine
processConfig method. The problem is that $gsgxml in
sfSimpleGoogleSitemap is private. The plugin could be much more flexible
if you define this variable as protected, so I am able to use it in my
class.
April 15th, 2011 - 23:28
Hi Jevgenijs,
I will make it protected on the next release
and I’ll also look at adding the functionality posted by Miquel
Cheers
June 30th, 2011 - 03:31
How can I specify a timestamp criteria in the app.yml file?
I need something like this:
criteria: # criterias to filter the records to include in the sitemap
– { column: schedule_at, method: ScheduleAt, operator: < , value: timestamp() }
What is the proper syntax for that ?
June 30th, 2011 - 11:04
Try this:
{ column: schedule_at, method: ScheduleAt, operator: < , value: current_timestamp }
July 14th, 2011 - 22:30
How to join TABLE?
July 15th, 2011 - 20:14
Hi Yordan,
It doesn’t support joins, but you can create stored view on MySQL and create a Propel class for it.
Sid
December 10th, 2011 - 07:21
Hi!
this worked for my date comparison:
– { column: start_date, method: StartDate, operator: <, value: '’ }
– { column: end_date, method: EndDate, operator: >, value: ” }
December 10th, 2011 - 07:25
sorry… how to write php code?!?
– { column: start_date, method: StartDate, operator: <, value: '’ }
– { column: end_date, method: EndDate, operator: >, value: ” }
December 10th, 2011 - 07:27
aaarrg
– { column: start_date, method: StartDate, operator: , value: ” }
value is ‘echo date(‘Y-m-d’, time())’
written in “php code inside yaml” style