PHP - Cakephp: Milesj's Forum Plugin
Hello everyone.
I'm relatively new to PHP, and I'm loving how CakePHP has made my life easy, and hard at the same time. I'm having trouble updating the deprecated Forum Plugin from milesj. If anyone there could help me, I'd much appreciate it. First off, deprecated views and controllers. They amaze me to no end. No matter how deep I try to trace them, it's impossible for me to find out what is wrong with it. I do have an idea, but I can't trace where I should change the codes. Second; admin roles, ACL, CRUD is not a fairly new concept to me now, but because of the deprecated codes I can't get a deeper understanding about why I can't disable new users from accessing the admin panel. Third; the Admin Plugin is good, but wouldn't detect the Forum Plugin correctly. I can't trace back where this went wrong. Also, adding new users through the admin panel doesn't hash the password. My codes are here for your viewing and mockery: http://www.mediafire...1/AsCIISite.rar Similar TutorialsI have a php file with a ton of vars that i need to access in a number of controllers. How can i simply include this file into a controller in cakephp? ~John I am looking to learn CakePHP are there recommendations for tutorials on CakePHP?
I hear CakePHP 3.0 being talked about like its something for the future but I also see that you can download it and there are tutorials for it out already. Is it ready for developmental use, or is it still too early for that?
Hey all, I'm using cakephp and it asks me a question and I'm not sure what to put in, because I don't necessarily know the consequences of what I put in: Code: [Select] Would you like to create the methods for admin routing? (y/n) [y] > y You need to enable Configu :write('Routing.admin','admin') in /app/config/core.php to use admin routing. What would you like the admin route to be? Example: www.example.com/admin/controller What would you like the admin route to be? [admin] > Thanks for response I am looking for a blog app or also a magazine type web app for CakePHP to learn from - any suggestions?
This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=352357.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=332465.0 Hi, I am having an awful time creating a composer.json file to install highchartsPHP for windows cakephp. I dont know how exactly to create a file. The examples I have for cakephp composer is for linux. I download the highchartsphp and I place it where? I have composer installed and I do what as version 3 doesnt require composer . https://github.com/g...i/HighchartsPHP I place the highcharts dir where ? where I should place files to install? How do I install this EXACTLY and does this require mean I have dir called ghunti? I really need some decent how to install as this really isnt good enough . It has been 2 days since I tried to install this highchartsPHP for cakePHP. { "require": { "ghunti/highcharts-php": "~3.0" } } This topic has been moved to Application Frameworks. http://www.phpfreaks.com/forums/index.php?topic=352519.0 This topic has been moved to Application Frameworks. http://www.phpfreaks.com/forums/index.php?topic=308958.0 Hello,
I have been using cakePHP now for a couple projects now. My next projects involves creating a web service and the entire front-end be built in angularjs.
Now, I understand how 'Form' Authentication works, and have done some research and people tell me if I have an SSL to use Basic Auth, for a web service, which is what I am using. But I am having a problem hooking both up nicely. Now with angular, I have a call for a page and send over the username and password. If the credentials are correct, the server returns back the correct data. The problem is if the credentials are wrong, I get the normal 'Basic Auth' pop up, asking me for my username and password.
My question is, instead of the server trying to re access the same page, is there a way to return json data back?
Example : I have an angular call going to 'cakerest/projects.json' -> Credentials are ok -> Data is returned, and with javascript I console.log it and see it.
2nd time I send the incorrect user and password, and the server responds back with a popup asking for credentials.
How can I get rid of that popup and just return "{Error : 'Credential problem'};
I can post code if that would help as well.
Thank you
This topic has been moved to Application Frameworks. http://www.phpfreaks.com/forums/index.php?topic=353428.0 I have been learning php and have put together a simple site to track vehicle faults and repairs, but now i am trying to transfer it to cakephp framework to make it easier to work with. My problem is that i have 4 tables,
the fault and repair
a list of vehicles
a list of symptoms
a list of fault codes.
Each repair can have 3 vehicles, 3 symptoms and 3 codes relating to it so i have lookup table to link the fault/repair id to the symptoms, code and vehicles.
i have setup basic code for the vehicle , symptom and fault code models like this:
public $hasAndBelongsToMany = array( 'Fault' => array( 'className' => 'Fault', 'joinTable' => 'Faults_vehicles', 'foreignKey' => 'vehicle_id', 'associationForeignKey' => 'fault_id' ) ); and this lets me search for any faults in the faults table with a given vehicle ID, and this works fine. My problem is how can i set it up so i can do a search for faults in the Faults table with a given vehicle ID and a given symptom ID that have a matching Fault code ID. I am very new to php and have only just started using cakephp so sorry in advance if this makes no sense at all. thanks for your time j There are no opening and closing tags in the code example of the file PostsController.php in this tutorial:
http://book.cakephp....g/part-two.html
Should I always use opening and closing PHP tags throughout with CakePHP? This topic has been moved to Application Frameworks. http://www.phpfreaks.com/forums/index.php?topic=352167.0 I have a 3-tables This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=353875.0 This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=347122.0 Hi all, I am working on php project and willing to use the "everything as a plugin" idea so alot of people can easily contribute. I am wondering how I can make a php page that includes my plugins, without having to hardcode them(as in require_once, ...). And afterwards it should be possible to execute a function on each of the enabled plugins. Especially the "hardcode" part I am not sure on how to fix it. As for executing a function for each plugin (so that will be a Class object), I wonder how I can make an object of each class from an interface and then execute a function without hardcoding the creation of all objects. Any one ideas or experience with something like this? Thanks in advance. Hey guys, I hate being a beggar but I am trying to figure out how to remove links from aawp-box__image and aawp-box__title. That’s a script from a plugin that uses Amazon to get the name, images, and other stuff of products directly on my site. I was wondering if there is a way to delete the links while still have the images downloaded from Amazon (the plugin is AAWP). Maybe someone can help me here?
<?php /* * Box template * ------------ * It's possible to display multiple boxes at once * * @package AAWP */ if ( ! defined( 'ABSPATH' ) ) { die( '-1' ); } ?> <?php foreach ( $this->items as $i => $item ) : ?> <?php $this->setup_item($i, $item); ?> <div class="<?php echo $this->get_classes('box'); ?>" <?php $this->the_product_container(); ?>> <div class="aawp-box__thumb"> <a class="aawp-box__image-link" ?>" title="<?php echo $this->get_product_image_link_title(); ?>" rel="nofollow" target="_blank"> <img class="aawp-box__image" src="<?php echo $this->get_product_image(); ?>" alt="<?php echo $this->get_product_image_alt(); ?>" <?php $this->the_product_image_title(); ?> /> </a> <?php if ( $this->get_product_rating() ) { ?> <div class="aawp-box__rating"> <?php echo $this->get_product_star_rating(); ?> <?php if ( $this->get_product_reviews() ) { ?> <div class="aawp-box__reviews"><?php echo $this->get_product_reviews(); ?></div> <?php } ?> </div> <?php } ?> </div> <div class="aawp-box__content"> <a class="aawp-box__title" ?>" title="<?php echo $this->get_product_link_title(); ?>" rel="nofollow" target="_blank"> <?php echo $this->get_product_title(); ?> </a> <div class="aawp-box__description"> <?php echo $this->get_product_description(); ?> </div> </div> <div class="aawp-box__footer"> <?php if ( $this->get_product_is_sale() ) { ?> <span class="aawp-box__ribbon aawp-box__sale"> <?php if ( $this->show_sale_discount() && $this->is_sale_discount_position('ribbon') ) { ?> <?php echo $this->get_saved_text(); ?> <?php } else { ?> <?php echo $this->get_sale_text(); ?> <?php } ?> </span> <?php } ?> <div class="aawp-box__pricing"> <?php if ( $this->get_product_is_sale() && $this->show_sale_discount() ) { ?> <span class="aawp-box__price aawp-box__price--old"><?php echo $this->get_product_pricing('old'); ?></span> <?php if ( $this->is_sale_discount_position('standard') ) { ?> <span class="aawp-box__price aawp-box__price--saved"><?php echo $this->get_saved_text(); ?></span> <?php } ?> <?php } ?> <?php if ( $this->show_advertised_price() ) { ?> <span class="aawp-box__price aawp-box__price--current"><?php echo $this->get_product_pricing(); ?></span> <?php } ?> <?php $this->the_product_check_prime_logo(); ?> </div> <?php echo $this->get_button('detail'); ?> <?php echo $this->get_button(); ?> <?php if ( $this->get_inline_info() ) { ?> <span class="aawp-box__info"><?php echo $this->get_inline_info_text(); ?></span> <?php } ?> </div> </div> <?php endforeach; ?> I hope that isn’t too much hassle, thank you! |