Symphony – Forum http://downloads.symphony-cms.com Symphony Forum Discussions en Symphony CMS {values} http://downloads.symphony-cms.com/discuss/thread/84826/ Thu, 23 Feb 2012 00:22:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84826/ <p><strong>By Manaus</strong></p><p>Hello, I read {$param} is from the parameters pool, but what does a string like this point at? </p> <pre><code>&lt;a href="{$root}/products/{title/@handle}/"&gt; </code></pre> <p>(ignore the $root of course)</p> <p>Thanks!</p> Contact Form http://downloads.symphony-cms.com/discuss/thread/84807/ Wed, 22 Feb 2012 18:31:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84807/ <p><strong>By ollybradshaw</strong></p><p>Hey guys.</p> <p>Where do i find the in-built contact form? is it a data source or a utility which i can add into any page?</p> Possible Refactor of the Symphony::Engine() method http://downloads.symphony-cms.com/discuss/thread/84793/ Wed, 22 Feb 2012 10:06:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84793/ <p><strong>By Nitriques</strong></p><p>Hi folks, I am back! After 4 long months of Objective-C, I am back into Symphony! We have a lot of websites to build in the next months and I am trilled to work with this beautifull piece of software again.</p> <p>Today, I was writting a simple php script in order to import data from a RSS Feed into Symphony entries. I use as a starting point Alistair's old Shell extension... works great, event with Sym 2.2.5, but it can't accomplish everything!! </p> <p>So I started to extends some core classes, making my way into a ShellEntry and a ShellEntryManager... But as soon as I would hit a <code>Symphony::Engine()</code> call, my script failed.</p> <p>So my idea would be this: Instead of the if else statement looking for the class Administration or Frontend, we could declare a static array of those class names. This way, we could 'inject' the Shell class (or any other Symphony implementation) and everything would be ok! I found that the if else statement has been copied elsewhere in the code source, and I am willing to patch everything out.</p> <p>I would like to have anybody's opinion on that, before doing the code. Thanks.</p> <p>B.T.W: Is this possible in 2.3 ?</p> <p>P.S. This post should be filled in the 'Development' category, but it does not exists, hence my choice of 'General'</p> How would I post to my Symphony site via email? http://downloads.symphony-cms.com/discuss/thread/84780/ Wed, 22 Feb 2012 04:28:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84780/ <p><strong>By bzerangue</strong></p><p>I would like to implement the ability to post to my Symphony site via email. Has someone in the Symphony Community already done this with a Symphony site. If so, would you mind pointing me in the right direction on how to approach something like that. </p> Creating a "grid view". http://downloads.symphony-cms.com/discuss/thread/84769/ Wed, 22 Feb 2012 02:46:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84769/ <p><strong>By retypejonas</strong></p><p>Hi,</p> <p>I guess this is a problem everyone will have sometime during their first Symphony projects, but i don't know what to search for. Sorry if im duplicating..</p> <p>Say you have a data source of items and want do display them in a grid on multiple lines.</p> <p>In PHP you'd probably create a $counter variable and if it reaches a certain value you would inject "</p>" or "<div class="last">" or something... i think you understand what i need. <p>My problem is to accomplish this in Xslt.</p> </div> Different performance for form submit http://downloads.symphony-cms.com/discuss/thread/84765/ Wed, 22 Feb 2012 02:04:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84765/ <p><strong>By Trastabuga</strong></p><p>This question might not be related to Symphony but I'll ask anyway, I am sure someone came across this issue before. When I submit my form using ajax and I specify action="" so the same page gets the request I see my page refresh almost immediately. If I specify action="/some-other-page/" the same requests handing the same xsl code may take up to 20 seconds (it generates a pretty long page). Is it related to the fact that somehow if the request channeled to a different page it has to build complete DOM and then return data to the requesting page (which takes some time) as opposed to start streaming data right away if the requesting page is the same as the action page?</p> <p>Thank you,</p> Problems when moving from localhost to server. http://downloads.symphony-cms.com/discuss/thread/84762/ Wed, 22 Feb 2012 01:32:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84762/ <p><strong>By retypejonas</strong></p><p>Hi,</p> <p>I started developing a Symphony site on localhost/folder/</p> <p>But when i'm moving it to domain.com it does not work.</p> <p>Front end says <code>The page you requested, , does not exist.</code></p> <p>And when i try to load the backend it gets stuck in a constant loop..</p> <p>`http://dmain.com/folder/folder/index.php/?symphony-page=folder/folder/index.php/&amp;symphony-page=folder/folder/index.php/&amp;symphony-page=folder/folder/index.php/&amp;symphony-page=folder/folder/index.php/&amp;symphony-page=folder/folder/index.php/&amp;symphony-page=folder/folder/index.php/&amp;symphony-page=folder/folder/index.php/&amp;symphony-page=folder/folder/index.php/&amp;symphony-page=folder/folder/index.php/&amp;symphony-page=folder/folder/index.php/&amp;symphony-page=folder/folder/index.php.....``</p> <p>I changed RewriteBase in .htaccess from <code>/folder</code> to <code>/</code> but i cant find any more place where the local folder structure is saved. Lurked trough config.php and the database with no luck..</p> XSL Sort and Variables Question http://downloads.symphony-cms.com/discuss/thread/84746/ Tue, 21 Feb 2012 21:17:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84746/ <p><strong>By moonoo2</strong></p><p>Haloo,</p> <p>I've been building a table of data with stats of points scored in rugby matches and have come up against something I'm not quite sure how to tackle in XSLT:</p> <pre><code> &lt;xsl:template match="matches/player-name" mode="overview"&gt; &lt;xsl:variable name="tries" select="sum(entry/tries)"/&gt; &lt;xsl:variable name="conversions" select="sum(entry/conversions)"/&gt; &lt;xsl:variable name="penalties" select="sum(entry/penalties)"/&gt; &lt;xsl:variable name="dropgoals" select="sum(entry/drop-goals)"/&gt; &lt;xsl:variable name="total" select="($dropgoals * 2) + ($penalties * 3)+ ($conversions * 2) + ($tries * 5)"/&gt; &lt;xsl:variable name="sort-order" select="'ascending'"/&gt; &lt;tr align="center"&gt; &lt;td align="left"&gt;&lt;a href="{$root}/{$url-language}/{$current-page}/{@link-handle}"&gt;&lt;xsl:value-of select="@value"/&gt;&lt;/a&gt;&lt;/td&gt; &lt;td align="center"&gt;&lt;xsl:value-of select="$tries"/&gt;&lt;/td&gt; &lt;td align="center"&gt;&lt;xsl:value-of select="sum(entry/conversions)"/&gt;&lt;/td&gt; &lt;td align="center"&gt;&lt;xsl:value-of select="sum(entry/penalties)"/&gt;&lt;/td&gt; &lt;td align="center"&gt;&lt;xsl:value-of select="sum(entry/drop-goals)"/&gt;&lt;/td&gt; &lt;td align="center"&gt;&lt;xsl:value-of select="$total" order="$sort-order"/&gt;&lt;/td&gt; &lt;/tr&gt; </code></pre> <p></p> <p>I'm using variables to tot up the totals for the players points and am in need of sorting the data with the highest score first.</p> <p>Is it not a good idea to do all this in XSLT? and should I be doing it in the section instead using something like reflection field and maybe sort on the value of the reflection field instead maybe? </p> <p>What is possible with Variable and the <code>xsl:sort</code> function here?</p> <p>Cheers</p> Adding Javascript after the jQuery script that symphony loads. http://downloads.symphony-cms.com/discuss/thread/84732/ Tue, 21 Feb 2012 15:40:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84732/ <p><strong>By koolaid</strong></p><p>I tried searching the form form and I couldn't seem to find an answer. I have also tried the "backend add script" extension but It seems to be broken or maybe I just don't know how to use it.</p> <p>All I am trying to do is add another script line after the jquery script which loads automatically, so I should get something like below.</p> <pre><code>&amp;lt;script type="text/javascript" src="/symphony/assets/jquery.js"&gt;&amp;lt;/script&gt; &amp;lt;script src="/workspace/js/jquery.myscript.js"&gt;&amp;lt;/script&gt; </code></pre> <p>Currently my way around this so I can test is by adding the lines of code to the frontend debug extension, which only works if you are a developer(Great for testing). However I would like to fix this issue, there must be an easier way to do this than creating an extension. Any ideas?</p> datasource regex -1 +1 confusion http://downloads.symphony-cms.com/discuss/thread/84721/ Tue, 21 Feb 2012 08:40:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84721/ <p><strong>By munki</strong></p><p>I have some positive and negative numbers in a text input field and I'm trying to filter them with regex in a datasource. </p> <p>If I regexp:^-1 then I get numbers starting -1 cool. However, if I regexp:^1 I get numbers starting with 1 or -1. </p> <p>Is there any way I can filter the required values, given that I only want to consider the first say 5 digits of fairly long numbers? So I don't want to filter by the full number explicitly. I want to get a bunch of numbers that start with -1xxxxx or 53xxxxx for example. </p> <p>I'm new to regexing in a datasource and I think maybe the '-' symbol at the start is ignored here. </p> <p>Can anyone give me some advice or perhaps a different solution to regex for this?</p> <p>Cheers,</p> CSS not rendering in a page feeding off master template http://downloads.symphony-cms.com/discuss/thread/84658/ Mon, 20 Feb 2012 09:03:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84658/ <p><strong>By ollybradshaw</strong></p><p>Hey guys. Promise this will be my last post...this evening.</p> <p>I have made a master.xsl file which feeds a master template, jQuery files and CSS into all my website page templates, however i have hit a problem.</p> <p>index.xsl renders all of its own content and the master.xsl content, stylesheets and scripts without an issue, but a new page that i have made (about.xsl) will render its own content in the markup (including the whole of master.xsl) but none of the style rules from the attached css file.</p> <p>what am i doing wrong here?</p> <p>Code here: (about.xsl) <a href="http://pastie.org/3416989">http://pastie.org/3416989</a></p> Having problems displaying images as content. http://downloads.symphony-cms.com/discuss/thread/84631/ Sun, 19 Feb 2012 23:31:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84631/ <p><strong>By ollybradshaw</strong></p><p>Hello all. Me again.</p> <p>I am scratching my head about how to display image based content on my pages.</p> <p>I have created a section with file upload set to image specifications (.png, .jpeg, .gif etc), however i cannot get the content to display properly using the <strong>xml:value-of</strong> tags.</p> <p>Once again, sorry if i have missed anything, but as far as i can see the documentation only covers text based content...</p> <p>I have tried wrapping the tags with <strong>img src</strong> which i am aware is probably not the way to go, but the content doesn't display when using the standalone tags with the relevant <strong>xml:template match</strong> tags either.</p> <p>Basically, can anybody explain to me how to get image content to display this way? as i need my user to change images within a nivo slider.</p> <p>If there is any documentation you think i may have missed then please link me! I hate to be a burden.</p> Having problems with integrating JS scripts and multiple CSS files into master.xsl http://downloads.symphony-cms.com/discuss/thread/84627/ Sun, 19 Feb 2012 22:39:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84627/ <p><strong>By ollybradshaw</strong></p><p>Hello Symphonites!</p> <p>Please forgive me if i have missed something along the way, however i cannot for the life of me get two very simple scripts to fire in the <strong>head</strong> of my master.xsl (referencing the files before calling upon them in the website)</p> <p>I want to integrate the latest version of JQuery (and Nivo Slider Plugins etc) to my website, as well as Googlefont API CSS reference, however when i paste these into my master.xsl i get a ton of XSLT errors....</p> <p>What am i doing wrong here?</p> <p>Code can be found here:</p> <p><a href="http://pastie.org/3413620">http://pastie.org/3413620</a></p> Members - Filtering by $member-role http://downloads.symphony-cms.com/discuss/thread/84604/ Sun, 19 Feb 2012 11:15:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84604/ <p><strong>By moonty</strong></p><p>Hi, I'm using the Members extension. I have users that have access to files based on their role. 'High' users should be able to see everything, 'Medium' users should be able to see everything in their role and lower and finally 'Low' users should only be able to see files in their level.</p> <p>I can see how to filter my 'Files' section directly matching the role but I can't see how to add the 'and lower' part.</p> <p>Thanks, Josh</p> Is it possible to grab parent and only specific child nodes? http://downloads.symphony-cms.com/discuss/thread/84594/ Sun, 19 Feb 2012 04:51:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84594/ <p><strong>By miika</strong></p><p>Is it possible to grab parent node and only specific child nodes?</p> <p>Example data:</p> <pre><code>&lt;parent&gt; &lt;child id="1" /&gt; &lt;child id="2" /&gt; &lt;child id="3" /&gt; &lt;/parent&gt; </code></pre> <p>Wanted example result:</p> <pre><code>&lt;parent&gt; &lt;child id="1" /&gt; &lt;/parent&gt; </code></pre> Setting default value for URL parameter http://downloads.symphony-cms.com/discuss/thread/84591/ Sun, 19 Feb 2012 03:18:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84591/ <p><strong>By miika</strong></p><p>I would like to set default value for URL param. Is it possible? I mean, when I create page, I can add URL parameters to text field, but if none is provided in the URL, I would like to use default value then.</p> How to insert some data to text area http://downloads.symphony-cms.com/discuss/thread/84545/ Sat, 18 Feb 2012 06:37:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84545/ <p><strong>By krystof_k</strong></p><p>I've started using Symphony recently and I must say I really like it. But I have a problem now, which I have no idea how to solve.</p> <p>It's very simple, all about inserting images into articles. I've created special section for images, which are associated which each article.</p> <p>But is there any way how to create some kind of button, which can insert the image when creating the article to the Markdown text area?</p> <p>Thanks!</p> Existing page does not exists http://downloads.symphony-cms.com/discuss/thread/84535/ Sat, 18 Feb 2012 02:51:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84535/ <p><strong>By Manaus</strong></p><p>Hello, out of the blue, "The page you requested, /chi-siamo/, does not exist" anymore. </p> <p><a href="http://pastie.org/3402428">Here</a> is the code</p> <p>the page values in the admin look usual. I deleted many sections I wasn't using, to which the page was probably attached. </p> <p>Thanks!!</p> What determines order of Navigation ? http://downloads.symphony-cms.com/discuss/thread/84503/ Fri, 17 Feb 2012 20:38:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84503/ <p><strong>By retypejonas</strong></p><p>Hello,</p> <p>I'm trying to figure out how to arrange in which order pages appear in the Navigation.</p> <p>I'm using the navigation.xsl that came as an example with my installation and can see that it used a DS that pulls "Navigation" from the "System" category. But it does only seem to order pages by creation date descending. And doesn't really give much options.</p> <p>How would i do if i want to arrange the navigation in a different order? Since this must be a common request i searched the forum and extensions for a solution but couldn't find any.</p> <p>Thanks!</p> generating a table in a template http://downloads.symphony-cms.com/discuss/thread/84490/ Fri, 17 Feb 2012 14:58:00 +1000 http://downloads.symphony-cms.com/discuss/thread/84490/ <p><strong>By koolaid</strong></p><p>So I am trying to make a simple two coloumn table that generates as many rows as I need to. In this example it should display 4 images in two rows. I am getting errors because the table tags aren't being closed properly. But they would be closed properly if the loop actually ran. Has anyone done something similar?</p> <pre><code>&lt;xsl:template name="vendors"&gt; &lt;table&gt; &lt;xsl:for-each select="//vendors/entry"&gt; &lt;xsl:if test="position() &amp;lt;= 4"&gt; &lt;xsl:choose&gt; &lt;xsl:when test="(position() mod 2) != 1"&gt; &lt;tr&gt;&lt;td&gt;&lt;a href="{$root}/vendors"&gt;&lt;img src="{$root}/image/1/125/0/uploads/{logo/filename}" /&gt;&lt;/a&gt;&lt;/td&gt; &lt;/xsl:when&gt; &lt;xsl:otherwise&gt; &lt;td&gt;&lt;a href="{$root}/vendors"&gt;&lt;img src="{$root}/image/1/125/0/uploads/{logo/filename}" /&gt;&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt; &lt;/xsl:otherwise&gt; &lt;/xsl:choose&gt; &lt;/xsl:if&gt; &lt;/xsl:for-each&gt; &lt;/table&gt; &lt;/xsl:template&gt; </code></pre>