Symphony – Forum http://symphony-cms.com Symphony Forum Discussions en Symphony CMS Symphony 2012 Boston Symposium http://symphony-cms.com/discuss/thread/84276/ Sat, 11 Feb 2012 11:44:00 +1000 http://symphony-cms.com/discuss/thread/84276/ <p><strong>By Lewis</strong></p><p>I would like to organize. Let's discuss.</p> Looking for a Symphony extension developer http://symphony-cms.com/discuss/thread/84274/ Sat, 11 Feb 2012 10:21:00 +1000 http://symphony-cms.com/discuss/thread/84274/ <p><strong>By liamegan</strong></p><p>Hi All,</p> <p>I'm currently looking for an extension developer to help out with the development of a reasonably specific extension. It makes use of an existing API and will be used to batch aggregate data into a symphony section for further use and display.</p> <p>Full API documentation and functional description will be available on enquiry.</p> params on top of page http://symphony-cms.com/discuss/thread/84258/ Sat, 11 Feb 2012 01:31:00 +1000 http://symphony-cms.com/discuss/thread/84258/ <p><strong>By Manaus</strong></p><p>Hello, why do I get a lot of params on top of page, while my code is just like this?</p> <pre><code>&lt;xsl:template match="/data/homepage-articles"&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Hello world&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;xsl:apply-templates/&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p></p> <p></p><h2></h2> <div></div> xpath misbehaviour? http://symphony-cms.com/discuss/thread/84243/ Fri, 10 Feb 2012 21:13:00 +1000 http://symphony-cms.com/discuss/thread/84243/ <p><strong>By Manaus</strong></p><p>Hello, I'm following the tutorial on xslt on <a href="http://www.tizag.com/xmlTutorial/xslttemplate.php">tizag</a>. But I can't match any "element" in the xml file just by tiping <em>element</em> in the symphony debug window. I need to enter *//element**</p> <p>Correction: I can match "homepage-articles" with <em>homepage-articles</em>, but not "homepage-articles/entry" with <em>entry</em>. </p> <p>How come? Thanks!</p> Some weird errors http://symphony-cms.com/discuss/thread/84231/ Fri, 10 Feb 2012 09:47:00 +1000 http://symphony-cms.com/discuss/thread/84231/ <p><strong>By davjand</strong></p><p>Hi</p> <p>A client has been 'trying to backup a database' and has caused some weird errors in symphony that I'm a bit confused about.</p> <p>The site is <a href="http://vulcanseals.com">vulcanseals.com</a>, does anyone have any idea what might have happened?</p> <p>Many Thanks David</p> A pop-up (overlay) window to submit event data http://symphony-cms.com/discuss/thread/84226/ Fri, 10 Feb 2012 06:45:00 +1000 http://symphony-cms.com/discuss/thread/84226/ <p><strong>By Trastabuga</strong></p><p>I think you guys have your own ways to provide a user interface to fill in the section entries. Is there a built-in GUI widget (or a preferrable one for Symphony) that would do following: When I am at some page of my site that is based on a data source, I can click an "Add entry" link which would pop up a modal window with a form that connects with the event. When "submit" is clicked on that window, it updates the page underneath without closing. I just guess that jQuery would do, any recommendation which widget/plugin is to be used here?</p> <p>Thank you,</p> Page handle as a filtering parameter for a data source http://symphony-cms.com/discuss/thread/84222/ Fri, 10 Feb 2012 03:31:00 +1000 http://symphony-cms.com/discuss/thread/84222/ <p><strong>By Trastabuga</strong></p><p>Do we have a special parameter which tells a data source to which page it's linked? I need to use the page handle in a data source for filtering. We have /data/params/current-page so I guess {$current-page} could be used as a filtering parameter?</p> <p>Thank you,</p> Constant Contact http://symphony-cms.com/discuss/thread/84209/ Fri, 10 Feb 2012 01:48:00 +1000 http://symphony-cms.com/discuss/thread/84209/ <p><strong>By Lewis</strong></p><p>Has anyone created a Constant Contact extension then I'm unaware about?</p> Splitting a textarea over 2 columns using XSLT http://symphony-cms.com/discuss/thread/84163/ Thu, 09 Feb 2012 09:54:00 +1000 http://symphony-cms.com/discuss/thread/84163/ <p><strong>By moonoo2</strong></p><p>I've inherited a design from someone and have just noticed that some of the articles have a 2 column layout where the actual body copy of the entry is presented over 2 columns(magazine style).</p> <p>Is there a means to achieve a split of the content so it presents itself over 2 columns?</p> Author Profile Implementation http://symphony-cms.com/discuss/thread/84160/ Thu, 09 Feb 2012 07:39:00 +1000 http://symphony-cms.com/discuss/thread/84160/ <p><strong>By tristian</strong></p><p>The site I'm working on includes a profile Section for each of the Symphony Authors. Each article thats created is linked to a Symphony Author (rather than the profile Section) - I wanted to take advantage of "Select current user by default".</p> <p>Just like other site with multiple authors I'd like the name that accompanies the article to link to the author's profile.</p> <p>Is there any danger in exposing the ID of the author (Symphony CMS Author) to the outside world?</p> requirejs http://symphony-cms.com/discuss/thread/84156/ Thu, 09 Feb 2012 06:00:00 +1000 http://symphony-cms.com/discuss/thread/84156/ <p><strong>By iwyg</strong></p><p>A new extension, "<a href="http://symphony-cms.com/download/extensions/view/84155/">requirejs</a>" is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.</p> firefox 10.0 backend save issue http://symphony-cms.com/discuss/thread/84135/ Thu, 09 Feb 2012 00:20:00 +1000 http://symphony-cms.com/discuss/thread/84135/ <p><strong>By ChriZ</strong></p><p>I've just switched from chrome back to firefox using the latest aurora v12 and firefox v10</p> <p>What kind of bugs me is that I can't save entries on symphony with this browser, I have no clue why this is. It works with no problems on Chrome and Safari.</p> <p>The error I get on Firefox is the following: Your browser sent a request that this server could not understand.</p> <p>I've reset cookies and everything, also updated to the latest stable version - with no luck.</p> <p>The Headers sent seem to look fine too:</p> <pre><code>POST /symphony/publish/events/edit/1878/ HTTP/1.1 Host: hinterhof.ch User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0) Gecko/20100101 Firefox/10.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.7,fr;q=0.3 Accept-Encoding: gzip, deflate Connection: keep-alive Referer: http://xyz/symphony/publish/events/edit/1878/ Cookie: PHPSESSID=8814f4e9f3d5a7bdb2b7ebc4b16cc3da </code></pre> <p>Any ideas? Does your symphony work with the latest Firefox version?</p> <p>Thank you!</p> internal server error on image upload after php upgrade http://symphony-cms.com/discuss/thread/84131/ Wed, 08 Feb 2012 22:43:00 +1000 http://symphony-cms.com/discuss/thread/84131/ <p><strong>By ChriZ</strong></p><p>Hello everyone I just upgraded php to 5.3.10 and now when uploading certain image files I receive an internal server error.</p> <p>Any clues? I checked php.ini max_upload etc. that doesn't seem to be the problem.</p> <p>If someone could point me in the right direction I'd be grateful!</p> <p>Thanks</p> Eurovision Participant - Using Symphony-built site. http://symphony-cms.com/discuss/thread/84119/ Wed, 08 Feb 2012 19:25:00 +1000 http://symphony-cms.com/discuss/thread/84119/ <p><strong>By gunglien</strong></p><p>This is just something small - to show the appreciation to this forum &amp; all Symphony Contributors.</p> <p>The site of <a href="http://kurtcalleja.com">Kurt Calleja</a>, a Maltese singer who is going to represent Malta in the Eurovision Song contest, has been developed in Symphony. It will be going through a minor upgrade in the coming weeks, so its more worthy of the title. And once updates are done will probably be submitted for the showcase.</p> <p>Hopefully helps raise the profile of Symphony - which has made the site so easy to develop and maintain. :)</p> Can this be done with using only DS http://symphony-cms.com/discuss/thread/84106/ Wed, 08 Feb 2012 02:04:00 +1000 http://symphony-cms.com/discuss/thread/84106/ <p><strong>By roelof</strong></p><p>I have this xslt:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; &lt;xsl:import href="../utilities/master.xsl"/&gt; &lt;xsl:import href="../utilities/dagboek-article.xsl"/&gt; &lt;xsl:param name="total_articles" select="data/dagboek/pagination/@total-entries" /&gt; &lt;xsl:param name="articles_per_page"&gt; &lt;xsl:choose&gt; &lt;xsl:when test="$page = 1 and $year = 2005 and $month = 04"&gt;1&lt;/xsl:when&gt; &lt;xsl:when test="$page = 1 and $year = 2005 and $month = 07"&gt;2&lt;/xsl:when&gt; &lt;xsl:when test="$page &amp;gt;= 1 and $page &amp;lt;= 4 and $year = 2005 and $month= 09"&gt;1&lt;/xsl:when&gt; &lt;xsl:when test="$page &amp;gt;= 5 and $page &amp;lt;= 7 and $year = 2005 and $month= 09"&gt;2&lt;/xsl:when&gt; &lt;xsl:when test="$page = 1 and $year = 2006 and $month=07"&gt;2&lt;/xsl:when&gt; &lt;xsl:when test="$page &amp;gt; 7 and $year = 2005 and $month = 09"&gt;3&lt;/xsl:when&gt; &lt;xsl:when test="$year = 2007 and $month=06"&gt;1&lt;/xsl:when&gt; &lt;xsl:otherwise&gt;4&lt;/xsl:otherwise&gt; &lt;/xsl:choose&gt; &lt;/xsl:param&gt; &lt;xsl:param name="number_pages"&gt; &lt;xsl:choose&gt; &lt;xsl:when test="$year = 2005 and $month = 04"&gt;3&lt;/xsl:when&gt; &lt;xsl:when test="$year = 2005 and $month = 08"&gt;4&lt;/xsl:when&gt; &lt;xsl:when test="$year = 2005 and $month = 09"&gt;11&lt;/xsl:when&gt; &lt;xsl:when test="$year = 2006 and $month = 07"&gt;2&lt;/xsl:when&gt; &lt;xsl:otherwise&gt; &lt;xsl:value-of select="ceiling($total_articles div $articles_per_page)" /&gt; &lt;/xsl:otherwise&gt; &lt;/xsl:choose&gt; &lt;/xsl:param&gt; &lt;xsl:param name="offset"&gt; &lt;xsl:choose&gt; &lt;xsl:when test="$page = 1 and $year = 2005 and $month = 04"&gt;0&lt;/xsl:when&gt; &lt;xsl:when test="$page &amp;gt; 1 and $year = 2005 and $month= 04"&gt; &lt;xsl:value-of select="($page - 1)* $articles_per_page - 3" /&gt; &lt;/xsl:when&gt; &lt;xsl:when test="$page &amp;gt; 1 and $year = 2005 and $month= 08"&gt; &lt;xsl:value-of select="($page - 1)* $articles_per_page - 2" /&gt; &lt;/xsl:when&gt; &lt;xsl:when test="$page &amp;gt;= 1 and $page &amp;lt;= 4 and $year = 2005 and $month= 09"&gt; &lt;xsl:value-of select = "$page -1" /&gt; &lt;/xsl:when&gt; &lt;xsl:when test="$page &amp;gt;= 5 and $page &amp;lt;= 7 and $year = 2005 and $month= 09"&gt; &lt;xsl:value-of select = "($page -1)* $articles_per_page - 4" /&gt; &lt;/xsl:when&gt; &lt;xsl:when test="$page &amp;gt; 7 and $year=2005 and $month = 09"&gt; &lt;xsl:value-of select = "($page -1)* $articles_per_page - 13" /&gt; &lt;/xsl:when&gt; &lt;xsl:when test="$page = 1 and $year = 2006 and $month = 07"&gt;0&lt;/xsl:when&gt; &lt;xsl:when test="$page = 2 and $year = 2006 and $month = 07"&gt;2&lt;/xsl:when&gt; &lt;xsl:otherwise&gt; &lt;xsl:value-of select="$articles_per_page * $page - $articles_per_page " /&gt; &lt;/xsl:otherwise&gt; &lt;/xsl:choose&gt; &lt;/xsl:param&gt; &lt;xsl:param name="end" select="$offset + $articles_per_page + 1" /&gt; &lt;xsl:template match="data"&gt; &lt;xsl:if test="$page &amp;lt;= $number_pages" &gt; &lt;xsl:apply-templates select="dagboek/entry[position() &amp;gt; $offset and position() &amp;lt; $end] " /&gt; &lt;/xsl:if&gt; &lt;xsl:if test="$page &amp;gt; $number_pages"&gt; &lt;xsl:call-template name="error" /&gt; &lt;/xsl:if&gt; &lt;xsl:if test="$number_pages &amp;gt; 1"&gt; &lt;div class="post-nav"&gt; &lt;xsl:if test=" $page &amp;gt; 1" &gt; &lt;span class="previous"&gt;&lt;a href="{$root}/dagboek/{$year}/{$month}/{$page - 1}"&gt;&lt;/a&gt; &lt;/span&gt; &lt;/xsl:if&gt; &lt;xsl:if test="$page &amp;lt; $number_pages" &gt; &lt;span class="next"&gt;&lt;a href="{$root}/dagboek/{$year}/{$month}/{$page + 1}"&gt;&lt;/a&gt;&lt;/span&gt; &lt;/xsl:if&gt; &lt;/div&gt; &lt;/xsl:if&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p>But now I wonder if I can achieve the same with only the use of DS.</p> <ul><li><code>total_articles</code> is the number of articles of a month.</li> <li><code>articles_per_page</code> are the number of articles on a page.</li> <li><code>number_pages</code> are the total number of pages of a month. </li> <li><code>offset</code> is the first article of a page.</li> <li><code>end</code> is the last articles of a page.</li> </ul><p>With these parameter I can achieve that I can decide how many articles there are on a page.</p> Calculating sum of basket items http://symphony-cms.com/discuss/thread/84094/ Tue, 07 Feb 2012 23:11:00 +1000 http://symphony-cms.com/discuss/thread/84094/ <p><strong>By stuartgpalmer</strong></p><p>I'm building a shopping cart which is too simple to warrant using the <a href="http://symphony-cms.com/download/extensions/view/35545/">shopping cart extension</a>. I want to calculate the order total from the sum of the basket items:</p> <p>The basket looks like this:</p> <pre><code>&lt;xsl:for-each select="basket-items/entry"&gt; &lt;xsl:variable name="line-cost}"&gt; &lt;xsl:value-of select="quantity * (/data/products/entry[./@id=current()/product-id]/price)" /&gt; &lt;/xsl:variable&gt; &lt;xsl:value-of select="format-number($line-cost,'£###.00')"/&gt; &lt;/xsl:for-each&gt; </code></pre> <p>I need to work out the cumulative value of the line costs. Can anyone suggest how I'd do this please.</p> Using standard php classes with Symphony http://symphony-cms.com/discuss/thread/84050/ Tue, 07 Feb 2012 05:21:00 +1000 http://symphony-cms.com/discuss/thread/84050/ <p><strong>By iwyg</strong></p><p><del>Me again.</del></p> <p><del>I've written a custom class that extends DirectoryIterator, but symphony won't let me use it: </del></p> <h1>Symphony Fatal Error:</h1> <pre><code> DirectoryIterator::__construct(/workspace/uploads): failed to open dir: No such file or directory. </code></pre> <p><del>Of course ’Class DirectoryIterator’ is not located in the directory of my custom class. So, is there any way around?</del></p> <p>Thanks in advance, Thomas </p> <p>Sorry, my fault. Been working to long. '/workspace/uploads' is indeed no directory at all…</p> Trying to load a sample extension and get error http://symphony-cms.com/discuss/thread/84048/ Tue, 07 Feb 2012 04:51:00 +1000 http://symphony-cms.com/discuss/thread/84048/ <p><strong>By Trastabuga</strong></p><p>I was following "<a href="http://tech.carsonsasser.com/article/how-to-register-and-use-custom-php-functions-inside-xsl">How to Register and Use Custom PHP Functions Inside XSL</a>" example and created my own extension under my-site/extensions/register<em>php</em>functions/extension.driver.php. Now when I refresh the extensions page under my site it prints an error:</p> <p>class extension<em>register</em>php<em>functions extends Extension { public function about() { return array( 'name' =&gt; 'Register PHP Functions', 'version' =&gt; '0.1', 'release-date' =&gt; '2010-10-08', 'author' =&gt; array( 'name' =&gt; '', 'website' =&gt; '', 'email' =&gt; '' ) ); } public function getSubscribedDelegates(){ return array( array( 'page' =&gt; '/frontend/', 'delegate' =&gt; 'FrontendOutputPreGenerate', 'callback' =&gt; 'registerFunctions' ) ); } public function registerFunctions($context){ $context['page']-&gt;registerPHPFunction('hello</em>world'); } } // Functions to be called by XSL page templates: function hello<em>world($path){ return "Hello World!"; } Fatal error: Class 'extension</em>register<em>php</em>functions' not found in /home/user/Dev/site.com/symphony/lib/toolkit/class.extensionmanager.php on line 629</p> <p>The line 629 is "self::$_pool[$name] = new $classname($param);". I printed out the element, looks like it's instantiated. What's missing in this case?</p> No support for the Shopping Cart extension? http://symphony-cms.com/discuss/thread/84046/ Tue, 07 Feb 2012 04:28:00 +1000 http://symphony-cms.com/discuss/thread/84046/ <p><strong>By ovidiust</strong></p><p>I was wondering if anyone offers any support any more for the Shopping Car. The discussion thread for this extension seems to have been quite for a while now. </p> using RegExp on "Settings" Page http://symphony-cms.com/discuss/thread/84039/ Tue, 07 Feb 2012 02:04:00 +1000 http://symphony-cms.com/discuss/thread/84039/ <p><strong>By iwyg</strong></p><p>For my extension I'm trying to a add validationfield on the settings page that holds a regular expression. All in all it works but escaped characters get stripped out (I think it's because of <code>Symphony::Configuration()</code> get and set.). I know it is possible on a regular validation field. Is there a possible workaround?</p> <p>Greetings, Thomas</p>