concrete5

Has anyone come across this php error before, Warning: imagejpeg()?

北慕城南 提交于 2019-12-20 06:21:45
问题 Warning: imagejpeg() [function.imagejpeg]: Unable to open '/home/SITENAME/public_html/files/cache/052f225905c1618003df0c5088aec7a9.jpg' for writing: Permission denied in /home/SITENAME/public_html/concrete/helpers/image.php on line 172 I emptied the cache directory and still no luck, and if I change the permissions on the cache folder then I get another error and I can't use the site at all: Warning: require_once(Zend/Cache/Backend/File.php) [function.require-once]: failed to open stream: No

Concrete5 (5.7) - Don't cache page or current block on block error

♀尐吖头ヾ 提交于 2019-12-14 03:59:01
问题 I've got a block that relies on a fairly flaky third party service to get data to render so, when it does encounter a problem, I'd like to display an error message, rather than throw an exception and not render the page. Easy enough to do until you come to block/page caching. The data has a long lifetime so, when found, it's fine to cache everything. When it isn't, though, the page is cached with the error message in place. As such, I need to tell the CMS not to save the block or page output

Page selector (block development)

点点圈 提交于 2019-12-13 16:41:43
问题 In Concrete 5.6 it was possible to create a JavaScript callback. I would like to know how this can be achieved in 5.7. I want to select a page and then do an ajax call to get the area names from that page. I took al look at the core files and the option for the callback does not exist anymore. I have used the js method to create the page selector. <div data-field="entry-link-page-selector" class="form-group"> <label><?php echo t('Choose Page:') ?></label> <div data-field="entry-link-page

PHP Concrete 5 Pass Variables to Add.php

霸气de小男生 提交于 2019-12-12 01:23:08
问题 I'm creating a new block and I want to pass a defined variable to the block instance on add. In my controller, I have the following: // declare the var public $hasMap = 0; public function add() { $this->set('hasMap', $this->generateMapNumber()); } The generateMapNumber() function looks like this: public function generateMapNumber() { return intval(mt_rand(1,time())); } In my add.php form I have a hidden field: <?php $myObj = $controller; ?> <input type="hidden" name="hasMap" value="<?php echo

Concrete5 Pagination - Limit Number of Pages Being Output

微笑、不失礼 提交于 2019-12-11 05:51:05
问题 This question is directly related to Concrete5 CMS. I'm using the built in Pagination helper in one of my page types and I'd like to limit the number of pages it renders with the following code: <?php echo $paginator->getPages(); ?> Here's the entire code I'm using in the template: if ($paginate && $num > 0 && is_object($pl)): ?> <div class="pagination"> <?php $summary = $pl->getSummary(); if ($summary->pages > 1): $paginator = $pl->getPagination(); ?> <span class="page-prev"><?php echo

Bottoms of share and other buttons cut off

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 04:56:17
问题 I am building a site in Concrete5 that uses an addon for the blog, and on the page type for individual posts there are share buttons for social media. For some reason the bottoms of the buttons are being cut off. I've tried using Firebug and Chrome dev tools to find the source of the problem, but have been unable to find the culprit style. Any help would be greatly appreciated!! 回答1: Check your CSS and add this: .stButton .stMainServices{ min-height: 30px; } Now it should work fine. 来源: https

How do I pass a dynamically created list to the controller to save into the database?

旧街凉风 提交于 2019-12-11 03:34:31
问题 I am working in Concrete5 and am new to the MVC concept. I have a some jquery that creates an unordered list from a textbox in my view. If your familiar with Concrete5 this is the view for the block I am adding the list to. It is basically a list of features for a product. This view needs to save the list to the database base file. Usually this is done pretty simply using a variable that the information gets saved to (aka this is how everything else in the view is saved). The problem I am

Concrete5: Can I use $_GET variable for query string on Regular Page?

痞子三分冷 提交于 2019-12-10 18:07:16
问题 How does $_GET Variable works with Concrete5? Can I use that on regular page? I know I can do this with single page via url segment, I'm just wondering if it is possible with regular page. Example is :http://www.domain_name.com/about-us/?name=test... 回答1: Get-parameters are available via the controllers. In the view of a page or block use: $this->controller->get("parameterName"); A cleaner way for custom parameters would be to define them in the function view() of the page controller. If at

how to pass php value from one file to another through java script

拜拜、爱过 提交于 2019-12-04 19:40:58
I am working with Concrete-5 CMS, I have an issue in passing value form view to controller.In my application I am using following code for displaying employee role. foreach($rd as $data){ echo "<tr><td>".$data[role_name]."</td><td>".$data[role_description]."</td><td><a href=".$this->action('edit', $data['role_id']).">Edit</a></td><td>".$ih->button_js(t('Delete'), "deleteRole('".$data['role_id']."')", 'left', 'error')."</td></tr>"; } <input type="hidden" name="rno" id="rno" /> script: $delConfirmJS = t('Are you sure you want to remove this Role?'); ?> <script type="text/javascript"> function

Has anyone come across this php error before, Warning: imagejpeg()?

匆匆过客 提交于 2019-12-02 10:16:41
Warning: imagejpeg() [function.imagejpeg]: Unable to open '/home/SITENAME/public_html/files/cache/052f225905c1618003df0c5088aec7a9.jpg' for writing: Permission denied in /home/SITENAME/public_html/concrete/helpers/image.php on line 172 I emptied the cache directory and still no luck, and if I change the permissions on the cache folder then I get another error and I can't use the site at all: Warning: require_once(Zend/Cache/Backend/File.php) [function.require-once]: failed to open stream: No such file or directory in /home/MYACCOUNT/public_html/concrete/libraries/3rdparty/Zend/Cache.php on