Search Results

Search found 5683 results on 228 pages for 'zend pdf'.

Page 54/228 | < Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >

  • Strategies for generating Zend Cache Keys

    - by emeraldjava
    ATM i'm manually generating a cache key based on the method name and parameters, then follow to the normal cache pattern. This is all done in the Controller and i'm calling a model class that 'extends Zend_Db_Table_Abstract'. public function indexAction() { $cache = Zend_Registry::get('cache'); $individualleaguekey = sprintf("getIndividualLeague_%d_%s",$leagueid,$division->code); if(!$leaguetable = $cache->load($individualleaguekey)) { $table = new Model_DbTable_Raceresult(); $leaguetable = $table->getIndividualLeague($leagueid,$division,$races); $cache->save($leaguetable, $individualleaguekey); } $this->view->leaguetable = $leaguetable; .... I want to avoid the duplication of parameters to the cache creation method and also to the model method, so i'm thinking of moving the caching logic away from my controller class and into model class packaged in './model/DbTable', but this seems incorrect since the DB model should only handle SQL operations. Any suggestions on how i can implement a clean patterned solution?

    Read the article

  • Dataflow in Controllers & Layouts in Zend Framework

    - by favo
    I use a basic setup which uses a layout.phtml for the HTML Layout and view scripts for the content part. I want to control some variables in the layout in my controllers, i.e. the title of my site. How can I access my layout to output variables from within the controller? Thanks for your feedback!

    Read the article

  • Zend Framework decorator subform add a class tag to DD wrapper tag

    - by Samuele
    I have this form: class Request_Form_Prova extends Zend_Form { public function init() { $this->setMethod('post'); $SubForm_Step = new Zend_Form_SubForm(); $SubForm_Step->setAttrib('class','Step'); $this->addSubform($SubForm_Step, 'Chicco'); $PrivacyCheck = $SubForm_Step->createElement('CheckBox', 'PrivacyCheck'); $PrivacyCheck->setLabel('I have read and I agre bla bla...') ->setRequired(true) ->setUncheckedValue(''); $PrivacyCheck->getDecorator('Label')->setOption('class', 'inline'); $SubForm_Step->addElement($PrivacyCheck); $SubForm_Step->addElement('submit', 'submit', array( 'ignore' => true, 'label' => 'OK', )); } } That generate this HTML: <form enctype="application/x-www-form-urlencoded" method="post" action=""> <dl class="zend_form"> <dt id="Chicco-label">&nbsp;</dt> <dd id="Chicco-element"> <fieldset id="fieldset-Chicco" class="Step"> <dl> <dt id="Chicco-PrivacyCheck-label"><label for="Chicco-PrivacyCheck" class="inline required">I have read and I agre bla bla...</label></dt> <dd id="Chicco-PrivacyCheck-element"> <input type="hidden" name="Chicco[PrivacyCheck]" value=""><input type="checkbox" name="Chicco[PrivacyCheck]" id="Chicco-PrivacyCheck" value="1"> </dd> <dt id="submit-label">&nbsp;</dt> <dd id="submit-element"> <input type="submit" name="Chicco[submit]" id="Chicco-submit" value="OK"> </dd> </dl> </fieldset> </dd> </dl> </form> How can I add a class="Test" to the <dd id="Chicco-element"> elemnt? In order to have it like that: <dd id="Chicco-element" class="Test"> I thought something like that but it don't work: $SubForm_Step->getDecorator('DdWrapper')->setOption('class', 'Test'); OR $SubForm_Step->getDecorator('DtDdWrapper')->setOption('class', 'Test'); How can I do it? And last question: How can I wrap that DD and DT element of a SubForm in another DL element? Like that: ( second line ) <dl class="zend_form"> <dl> <dt id="Chicco-label">&nbsp;</dt> <dd id="Chicco-element"> <fieldset id="fieldset-Chicco" class="Step"> <dl> .......

    Read the article

  • Zend not autoloading models

    - by Guy
    Ok, this is driving me nuts! I have a directory structure as follows: application - modules -- default --- controllers --- models ---- DbTable ---- Cachmapper.php --- views My config file looks like this [production] phpSettings.display_startup_errors = 0 phpSettings.display_errors = 0 includePaths.library = APPLICATION_PATH "/../library" bootstrap.path = APPLICATION_PATH "/Bootstrap.php" bootstrap.class = "Bootstrap" resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" resources.modules[] = The application seems to work, if I navigate to localhost, it correctly goes to the index controller. But, for some reason it refuses to load any models. Fatal error: Class 'Model_Cachmapper' not found in .............................../application/modules/default/controllers/IndexController.php on line 26 Ideas? Thanks

    Read the article

  • How to stop Zend Framework from appending '/scripts/' to the View Base Path

    - by Hannes
    Thats basically my code (simplified): class IndexController extends Zend_Controller_Action { public function indexAction(){ $this->view->setBasePath(APPLICATION_PATH . '/views/partner/xyz/'); $this->view->render('node.phtml'); } } Now what I (obvoiusly) want is to use the view script APPLICATION_PATH . '/views/partner/xyz/node.phtml' but ZF always tries to load APPLICATION_PATH . '/views/partner/xyz/scripts/node.phtml' is there any Way around that Behviour?

    Read the article

  • Zend redirect problem

    - by John
    I'm trying to redirect to http://localhost/site/public/admin/login from http://localhost/site/public but for some reason, it keeps redirecting to http://localhost/admin/login The code I am using is: $this->_response->setRedirect('/admin/login')->sendResponse(); This is really frustrating me, and any help would be grealy appreciated

    Read the article

  • holding session state with zend framework in iframe?

    - by princyp
    I have a php site optimized for iphone, its currently running inside of an iframe in a uiwebview objective c wrapper. Everything currently works except for the sessions inside of the iframe, Im assuming this is due to the cross domain issue with iframes and sessions? my solution is to save the sessions to the db. Is this the best solution? Will this even solve my problem? should I use memcache instead? are there any good tutorials for doing this? I havent been able to find an easy to implement solution for saving the session data, im a bit confused by the bootstrap.php and I keep getting this error when I try to add session saving: 'no adapter found for Zend_Session_SaveHandler_DbTable' any help would be greatly appreciated, thank you

    Read the article

  • Zend Framework Form Element Validators - validate a field even if not required

    - by Jeremy Hicks
    Is there a way to get a validator to fire even if the form element isn't required? I have a form where I want to validate the contents of a texbox (make sure not empty) if the value of another form element, which is a couple of radio buttons, has a specific value selected. Right now I'm doing this by overriding the isValid() function of my form class and it works great. However, I'd like to move this to either its on validator or use the Callback validator. Here's what I have so far, but it never seems to get called unless I change the field to setRequired(true) which I don't want to do at all times, only if the value of the other form element is set to a specific value. // In my form class's init function $budget = new Zend_Form_Element_Radio('budget'); $budget->setLabel('Budget') ->setRequired(true) ->setMultiOptions($options); $budgetAmount = new Zend_Form_Element_Text('budget_amount'); $budgetAmount->setLabel('Budget Amount') ->setRequired(false) ->addFilter('StringTrim') ->addValidator(new App_Validate_BudgetAmount()); //Here is my custom validator (incomplete) but just testing to see if it even gets called. class App_Validate_BudgetAmount extends Zend_Validate_Abstract { const STRING_EMPTY = 'stringEmpty'; protected $_messageTemplates = array( self::STRING_EMPTY => 'please provide a budget amount' ); public function isValid($value) { echo 'validating...'; var_dump($value); return true; } }

    Read the article

  • Zend Framework Module Based Error Handling

    - by cnkt
    Zend_Controller_Plugin_ErrorHandler always forwards to ErrorController::errorAction() in the default module but i want it be module aware. For example when a exception throws it must be call the module's ErrorController like Admin_ErrorController:errorAction. How can i do this? Thanks.

    Read the article

  • PHP Default Timezone issue on Fedora + Zend Server CE

    - by Dave Morris
    I have ZendServer CE (PHP 5.2) installed on a Fedora VM, and I have the system timezone set to 'America/Chicago'. I have date.timezone = 'UTC' in my php.ini file, and when I call date_default_timezone_get(), or display date('T') on a web page, it says 'CDT'. The documentation on php.net for date_default_timezone_get() says it follows this order when choosing a default timezone: - Reading the timezone set using the date_default_timezone_set() function (if any) - Reading the TZ environment variable (if non empty) - Reading the value of the date.timezone ini option (if set) - Querying the host operating system (if supported and allowed by the OS) If I change the system timezone through the 'setup' GUI, and reboot the server, date('T') returns whatever I changed the system timezone to, regardless of what php.ini says. I also don't have a TZ environment variable, and I am not currently using date_default_timezone_set() anywhere in my code. Any idea what might be going on? I realize I can always override the system timezone by calling date_default_timezone_set('UTC'), but I'd rather rely on the php.ini file if possible. Thanks for the help, Dave

    Read the article

  • Zend frem work different session for admin and front end

    - by user319198
    Hi, Its my 1st App using ZF. As our client requirement i have made separate admin and front panel. Without using Zend_Acl. I have problem when session expires it always takes me on front end log in page . I have tried to solve it by session but it's using single session for both admin anf front panel. I there any way so i can create separate session for both admin and front panel ?

    Read the article

  • How do I get Chromium to show PDFs using Evince?

    - by potofcoffee
    Is there any way to get Chromium to use a mozpluggerrc/evince combination to show PDFs embedded into its own window? Right now, Chromium is just downloading PDFs. I can open them in an external evince window by clicking on the downloaded file. I am using Chrome 18.0.1025.168 under Ubuntu 12.04 (amd64). Here's the pdf section of my /etc/mozpluggerrc.d/62-documents.conf: application/pdf:pdf:PDF file application/x-pdf:pdf:PDF file text/pdf:pdf:PDF file text/x-pdf:pdf:PDF file repeat noisy swallow(evince) fill needs_xembed: evince "$file" mozpluggerrc does show up in about:plugins. BTW, this works just fine in Firefox. Note: I am not looking for hints on how to use Google Chrome's PDF plugin in Chromium.

    Read the article

  • zend framework version trouble

    - by sasori
    Hi, am 100% sure I downloaded and extracted version 1.8 of ZF, but then when I go to console and typed "zf show version" it says am using 1.9.6, yes I do have 1.9.6 but it is "Compressed" and untouched, how could this be possible ?, I double checked my system variables, there's no evidence of ZF there. I also checked my php.ini file, it's pointed to the location of the extracted 1.8 ZF.. please help. this is my first attempt in using ZF

    Read the article

  • Using OpenID with Zend Framework.

    - by user284503
    I want my website to do exactly what Stackoverflow does with openId. I'm combing through sources, and I have done this before with facebook, but not making much progress with OpenID. What I would like to do is just detect if someone has logged into Google, and if they have get some identifying information, and allow them to federate into my site. Can anyone suggest any tutorials or Code snippets, and should I use Zends Libraries ? -P

    Read the article

  • peoblem with download file on zend framework

    - by user1400
    hello all i am using upload files to server in my application, it works fine , i want other users could download these file ,but i get error i created a upload folder in public folder and i upload my files in upload folder now when i create a link (<a href="http://mytest/public/1.jpg">download image</a>) to these files i get error "The requested URL /public/upload/1.jpg was not found on this server." how should i use routing for download these files? someone may help please thanks

    Read the article

  • Zend Framework, what $this->_forward is doing

    - by RageZ
    Hello everyone, I would like someone to explain me what _forward is exactly doing, I cannot see if _forward is also rendering the attached view to the action or just executing the action. Also is it possible to pass argument to $this-action in a view script ? More generally my problem is how to code a confirmation page, let's say the user input some stuff and you want to show him confirmation, is forward is mean for that case ? Thanks

    Read the article

  • download file on zend framework

    - by user1400
    hello all i am using upload files to server in my application, it works fine , i want other users could download these file ,but i get error i create a upload folder in public folder and i upload my files in upload folder now when i create a link (<a href="http://mytest/public/1.jpg">download image</a>) to these files i get error "The requested URL /public/upload/1.jpg was not found on this server." any one may help please? thanks

    Read the article

  • change available checkboxes after select[html] changed - Zend Framework

    - by Lormitto
    Hi, Could you please help me rosolve my troubling matter. I used Zend_Form to create what I needed. However as I have relations many to many i decided to present multiple choices via checkboxes. Unfortunately range of these checkboxes depends on select field available in form. I would like to change visible/availabe checkboxes depending on select option choosen. I found that it should be possible to use javascript however I've got no idea how to take advantege of it in form based on Zend_Form. Could you suggest possible solution? Thank you in advance. Kind Regards,

    Read the article

< Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >