pyrocms

Correctly locating asset file with asset library

南楼画角 提交于 2020-02-25 08:46:05
问题 I'm using the asset library that comes with pyrocms for my cms and I have a set up like this for my assets. I am trying to figure out with the paths and namespacing how I can access the bootstrap.css file correctly with the documentation. http://docs.pyrocms.com/2.1/manual/developers/tools/assets I have updated my asset.php configuration file to look like this: $config['asset_paths'] = array( 'core' => 'assets/', 'globals' => 'assets/globals/' ); This is the line I have set up in my template

API - Error 202 “Your credentials do not allow access to this resource”

社会主义新天地 提交于 2020-01-19 16:22:26
问题 I am trying to use account/verify_credentials and statuses/update API. I always get an error 202 , please see error returned below: {"errors":[{"code":220,"message":"Your credentials do not allow access to this resource."}]} 回答1: Double check your code - it looks like, that you're calling the Twitter REST API with an application-token, instead of an user-token. Have a look here: https://dev.twitter.com/docs/auth/application-only-auth To be able to successfully creating a new status for an

Laravel - Calling Redirect::to() from within view

徘徊边缘 提交于 2020-01-02 07:45:27
问题 I'm currently working on a cms which is built on the Laravel 4 framework. I'm trying to build a plugin system, similar to Pyro CMS, where module views can be included in a page view using the Blade template system. I'm building a contact form plugin that if submitted successfully will redirect the user to a given url, or simply redirect back to the existing page. The code for my contact form class is: class Contact { public static function form($params) { //get params and execute relevant

Manage Login Redirection in Pyrocms

谁都会走 提交于 2019-12-22 09:19:47
问题 I need to manage login in such a way that it should redirect the control after successful login to the page which call login method in pyrocms. By default it return control to Home Page. for example i want to go gallery page but it require user to be logged in so it will redirect control to the login page and now i want to redirect the control back to the gallery page once the user successful logged in. 回答1: Finally, i have come with the exact solution which is working correctly for me.

Action you have requested is not allowed error

ぐ巨炮叔叔 提交于 2019-12-17 16:28:36
问题 I made a module named Gallery which works fine on my localhost with version 2.0.3, but when using version 2.1.0 on a remote site I can not submit a form and I get the error: The action you have requested is not allowed. Why is this? 回答1: It is a Codeigniter error related to the CSRF protection. You can cancel it in cms/config/config.php 回答2: I agree with @Jhourlad Estrella on fixing the problems instead of disabling a security feature, however I feel that the real problem is with the hidden

Is it possible so that when we input the authors name it get automatically linked to profile page?

穿精又带淫゛_ 提交于 2019-12-11 22:52:16
问题 Currently am working on a bookstore application. http://framzndesinz.com/demo/bookstore/index.php/books/responsivedesign Author(s): suzuki Takahashi, Ibrahim sejen I want sepearte hyperlink for the 2 authors show. It will be going to their respective author pages when click. The author page will be having a description about author,authors image gallery and list of books written by him. Please Help. Can anyone tell how can it be done. Is it possible so that when we input the authors name it

PyroCMS - custom module design, clear CSS formating from default design

帅比萌擦擦* 提交于 2019-12-11 13:19:00
问题 I'm creating some custom modules on PyroCMS, and the problem is, that the default design that is inherited from global.css and other default design css files really messes with my new design and makes it harder to create a design for my custom modules. writing !important on every line doesn't seem like a good option. Also, I'm trying to add chromatable jQuery plugin, but it is not quite woring right, because the default CSS files ar conflicting with the design that plugin is trying to add.

Pyrocms Contact form in facebook tabs - displaying errors on page load

 ̄綄美尐妖づ 提交于 2019-12-11 07:29:44
问题 I'm trying to use the PyroCMS Contact form in a facebook tab. When displaying the page directly, everything is OK, the form page is displayed as wished without error message. https://facebook.noviris.com/tests/contact When I integrate this page via a facebook page tab, it displays the form post errors on page load, not after using the submit button. https://www.facebook.com/gwadaweb?sk=app_197712883656289 回答1: Facebook send signed_request parameter to your page tab every time you arrives to

Change the uri of a module without renaming the class in PyroCMS

空扰寡人 提交于 2019-12-11 03:43:34
问题 What is the best way to change the uri of a module without renaming the class. For example I'd like the blog module to show: / blog /post-title -> / news /post-title routes.php? 回答1: First I added to the routes.php. $route['news/([0-9]+)/([0-9]+)/([a-zA-Z0-9_-]+)'] = 'blog/$1/$2/$3'; Then to make sure the correct links I added this to the blog plugin.php. foreach ($posts as &$post) { $post->url = str_replace('blog/', 'news/', $post->url); } 回答2: The best way is to use the routes module. If

Pyrocms module or widget or plugin

只谈情不闲聊 提交于 2019-12-10 10:38:13
问题 This is driving me mad! I want to include a simple contact form on a sites homepage. I can't work out if I need to build a module, widget or plugin. None of them seem to be quite right! Modules only seem to work as standalone pages eg the existing contact module. Widgets only seem to display data (got from db or some kind of feed eg twitter) and a plugin seems to be just like a library class. What I need is most like a module. I need a controller (to display the correct view and process the