Developing (v7+)

How to check if a function returns error or not

Say you pass the wrong data type to a function such as DateTime::createFromFormat, You will get an error that stops the script. Is there a way to instead check if the function returns an error or not then do something based on that? Kind of how bash "i…

First block - new guy question

I need to make or find a block that will allow me to set say 3 pieces of pre-defined text as a site admin. Green, Amber, Red. Then I want to be able to allow a privileged user to set only one to be actively displayed at a time. I can create the input part…

302 Redirect issue with multilingual sites

Hi everyone I have a few multilingual hotel sites (running on 5.7.5.6 and 5.7.5.9) that produce issues revolving around google indexing: Some sub-sites just don't get indexed, apparently due to a 302 redirect ... I am using the Page Selector Attribu…

Get stacks by folder

I know I can get a specific stack by handle like this: [code] $stack = Stack::getByName('STACK NAME'); [/code] But is there a way to get all stacks that belong to a folder?

Redirect from Paypal to form submission

I created a web page last year in html/jquery that users could enter data on then choose to pay the balance through Paypal. Once the user had paid, Paypal redirected back to the website where I had jquery that automatically filled the input fields based …

Setting new users custom attributes

Hi I have recently followed some documentation to create new users from a csv file programatically. According to the Concrete5 docs/api there was method called getByID( $uID ) but this has since be deprecated! I am creating a new user like so: $us…

Multilingual Copy Tree Problem

Hi, I have a problem with multilingual website. When trying to duplicate my ENG website to the FR part i got this error when i duplicate content with the Multilingual add on : [code] Warning: mysql_query(): Access denied for user ''@'localhost' …

Package including src, returning doctarine exception.

Following the guidelines on this page: I added a /src directory to my package, and included the PHPExcel library. https://github.com/PHPOffice/PHPExcel And the following code to the package controller: [code] protected $pkgAutoloaderRegistrie…

access external ms sqlserver db config

Hello, I´m having troubles to connect to an external ms sqlserver from my c5. I've tried PDOSqlsrv and SQLSrv and the first one says it can't find the class and the second says: Call to undefined function Doctrine\DBAL\Driver\SQLSrv\sqlsrv_configure() …

Filter Posts