Re: [fw-general] sharing zend framework inside the main domain from the subdoamin
Thanks Gerard I have got that working what you said below. I have got a module that points to a sub-domain via htaccess. But this is all happening on my WAMP test server and I also created a sub-domain in the host file inside WIndows. But the web hosting company's production server (plesk) also creates the folders with all that standard public_html folder and others once I create a sub-domain. Now I don't want that to happen, I want the sub-domain to exist but without its physical folders. I will be asking the provider for the alternative. I am not sure if I can bypass the sub-domain folders (or some sort of sub-domain redirection to the domain folder) with some htaccess trickery. I am not great in regex so I don't know if it is possible to do this way drm-4 wrote: Hi Pradosh prado wrote: subdomain installation? Do i need to do some bootstrapping on the subdomain? Can this be achieved through a module that sits on the subdomain and that can be connected to the zf on the main domain? What do you mean by connected? I'm assuming you mean example.org by main domain, and whatever.example.org by subdomain? Regularly, the easiest way to share any server side code between the two is simply let them run inside the same document root, and let php code or rewrite rules handle the differences between the two. But I'm not really sure what it is you want, so please be a bit more specific. Regards, Gerard -- View this message in context: http://n4.nabble.com/sharing-zend-framework-inside-the-main-domain-from-the-subdoamin-tp955998p956844.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] sharing zend framework inside the main domain from the subdoamin
Hi, prado wrote: But the web hosting company's production server (plesk) also creates the folders with all that standard public_html folder and others once I create a sub-domain. Now I don't want that to happen, I want the sub-domain to exist but without its physical folders. I will be asking the provider for the alternative. I am not sure if I can bypass the sub-domain folders (or some sort of sub-domain redirection to the domain folder) with some htaccess trickery. I am not great in regex so I don't know if it is possible to do this way The only thing that is needed is a ServerAlias in the VirtualHost ... apache configuration for the main domain, preferably a wilcard alias. It would surprise me if Plesk can not handle that. If not, I fear you are stuck, unless you can somehow hook into the generated Apache configuration by Plesk. (It has been about 3 years since I worked with plesk on this level, so I can not help you with that, but if I remember correctly, Plesk includes a host.conf files somewhere per domain where you could put the ServerAlias directive yourself). Gerard
Re: [fw-general] sharing zend framework inside the main domain from the subdoamin
Thanks Gerard for your help again. I don't have a VPS account, it is just one of those standard shared hosting service. I am using a local company and I can get in touch with the domain manager who is helpful. I know that is my last option to use. thanks anyway! cheers Pradosh drm-4 wrote: Hi, prado wrote: But the web hosting company's production server (plesk) also creates the folders with all that standard public_html folder and others once I create a sub-domain. Now I don't want that to happen, I want the sub-domain to exist but without its physical folders. I will be asking the provider for the alternative. I am not sure if I can bypass the sub-domain folders (or some sort of sub-domain redirection to the domain folder) with some htaccess trickery. I am not great in regex so I don't know if it is possible to do this way The only thing that is needed is a ServerAlias in the VirtualHost ... apache configuration for the main domain, preferably a wilcard alias. It would surprise me if Plesk can not handle that. If not, I fear you are stuck, unless you can somehow hook into the generated Apache configuration by Plesk. (It has been about 3 years since I worked with plesk on this level, so I can not help you with that, but if I remember correctly, Plesk includes a host.conf files somewhere per domain where you could put the ServerAlias directive yourself). Gerard -- View this message in context: http://n4.nabble.com/sharing-zend-framework-inside-the-main-domain-from-the-subdoamin-tp955998p956861.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] sharing zend framework inside the main domain from the subdoamin
Plesk doesnt support wildcard domains. A possible work around is using the same root dir for all subdomains. Thanks Daniel 2009/12/10 prado prados...@hotmail.com: Thanks Gerard for your help again. I don't have a VPS account, it is just one of those standard shared hosting service. I am using a local company and I can get in touch with the domain manager who is helpful. I know that is my last option to use. thanks anyway! cheers Pradosh drm-4 wrote: Hi, prado wrote: But the web hosting company's production server (plesk) also creates the folders with all that standard public_html folder and others once I create a sub-domain. Now I don't want that to happen, I want the sub-domain to exist but without its physical folders. I will be asking the provider for the alternative. I am not sure if I can bypass the sub-domain folders (or some sort of sub-domain redirection to the domain folder) with some htaccess trickery. I am not great in regex so I don't know if it is possible to do this way The only thing that is needed is a ServerAlias in the VirtualHost ... apache configuration for the main domain, preferably a wilcard alias. It would surprise me if Plesk can not handle that. If not, I fear you are stuck, unless you can somehow hook into the generated Apache configuration by Plesk. (It has been about 3 years since I worked with plesk on this level, so I can not help you with that, but if I remember correctly, Plesk includes a host.conf files somewhere per domain where you could put the ServerAlias directive yourself). Gerard -- View this message in context: http://n4.nabble.com/sharing-zend-framework-inside-the-main-domain-from-the-subdoamin-tp955998p956861.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] sharing zend framework inside the main domain from the subdoamin
same root dir for all subdomains? could you clarify further? thanks Pradosh Daniel Latter wrote: Plesk doesnt support wildcard domains. A possible work around is using the same root dir for all subdomains. Thanks Daniel 2009/12/10 prado prados...@hotmail.com: Thanks Gerard for your help again. I don't have a VPS account, it is just one of those standard shared hosting service. I am using a local company and I can get in touch with the domain manager who is helpful. I know that is my last option to use. thanks anyway! cheers Pradosh drm-4 wrote: Hi, prado wrote: But the web hosting company's production server (plesk) also creates the folders with all that standard public_html folder and others once I create a sub-domain. Now I don't want that to happen, I want the sub-domain to exist but without its physical folders. I will be asking the provider for the alternative. I am not sure if I can bypass the sub-domain folders (or some sort of sub-domain redirection to the domain folder) with some htaccess trickery. I am not great in regex so I don't know if it is possible to do this way The only thing that is needed is a ServerAlias in the VirtualHost ... apache configuration for the main domain, preferably a wilcard alias. It would surprise me if Plesk can not handle that. If not, I fear you are stuck, unless you can somehow hook into the generated Apache configuration by Plesk. (It has been about 3 years since I worked with plesk on this level, so I can not help you with that, but if I remember correctly, Plesk includes a host.conf files somewhere per domain where you could put the ServerAlias directive yourself). Gerard -- View this message in context: http://n4.nabble.com/sharing-zend-framework-inside-the-main-domain-from-the-subdoamin-tp955998p956861.html Sent from the Zend Framework mailing list archive at Nabble.com. -- View this message in context: http://n4.nabble.com/sharing-zend-framework-inside-the-main-domain-from-the-subdoamin-tp955998p956873.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] sharing zend framework inside the main domain from the subdoamin
Well I use plesk and ZF. I have many subdomains running from a single ZF app. Now I cant have wilcard domains which means I will need a subfolder for each domain - this will become unwieldly, so I have a single sub-domain root dir and I just use this for each new subdomain I create. All the dir has init is an index.php file the calls the ZF app, so I only have one dir for all subdomains. Hope this makes sense. Obvioulsy If I could have wild-card domains I would, maybe future versions of Plesk will? 2009/12/10 prado prados...@hotmail.com: same root dir for all subdomains? could you clarify further? thanks Pradosh Daniel Latter wrote: Plesk doesnt support wildcard domains. A possible work around is using the same root dir for all subdomains. Thanks Daniel 2009/12/10 prado prados...@hotmail.com: Thanks Gerard for your help again. I don't have a VPS account, it is just one of those standard shared hosting service. I am using a local company and I can get in touch with the domain manager who is helpful. I know that is my last option to use. thanks anyway! cheers Pradosh drm-4 wrote: Hi, prado wrote: But the web hosting company's production server (plesk) also creates the folders with all that standard public_html folder and others once I create a sub-domain. Now I don't want that to happen, I want the sub-domain to exist but without its physical folders. I will be asking the provider for the alternative. I am not sure if I can bypass the sub-domain folders (or some sort of sub-domain redirection to the domain folder) with some htaccess trickery. I am not great in regex so I don't know if it is possible to do this way The only thing that is needed is a ServerAlias in the VirtualHost ... apache configuration for the main domain, preferably a wilcard alias. It would surprise me if Plesk can not handle that. If not, I fear you are stuck, unless you can somehow hook into the generated Apache configuration by Plesk. (It has been about 3 years since I worked with plesk on this level, so I can not help you with that, but if I remember correctly, Plesk includes a host.conf files somewhere per domain where you could put the ServerAlias directive yourself). Gerard -- View this message in context: http://n4.nabble.com/sharing-zend-framework-inside-the-main-domain-from-the-subdoamin-tp955998p956861.html Sent from the Zend Framework mailing list archive at Nabble.com. -- View this message in context: http://n4.nabble.com/sharing-zend-framework-inside-the-main-domain-from-the-subdoamin-tp955998p956873.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] sharing zend framework inside the main domain from the subdoamin
Unlike cpanel Plesk creates a separate account with all its httpdocs etc. so you are saying that you create one sub-domain and control all other sub domains via it. So does your index.php direct to the bootstrap/application.php on the main domain? I have a module www.example.com/blog which I want to point to blog.example.com. So how can I get to that via the index.php on the subdomain. Would that be through a htaccess file with all the rewrite conditions? Daniel Latter wrote: One more thing I should mention is that I use the subdomain part of the domain to distinguish subdomains, and I have a whitelist to. 2009/12/10 Daniel Latter dan.lat...@gmail.com: Well I use plesk and ZF. I have many subdomains running from a single ZF app. Now I cant have wilcard domains which means I will need a subfolder for each domain - this will become unwieldly, so I have a single sub-domain root dir and I just use this for each new subdomain I create. All the dir has init is an index.php file the calls the ZF app, so I only have one dir for all subdomains. Hope this makes sense. Obvioulsy If I could have wild-card domains I would, maybe future versions of Plesk will? 2009/12/10 prado prados...@hotmail.com: same root dir for all subdomains? could you clarify further? thanks Pradosh Daniel Latter wrote: Plesk doesnt support wildcard domains. A possible work around is using the same root dir for all subdomains. Thanks Daniel 2009/12/10 prado prados...@hotmail.com: Thanks Gerard for your help again. I don't have a VPS account, it is just one of those standard shared hosting service. I am using a local company and I can get in touch with the domain manager who is helpful. I know that is my last option to use. thanks anyway! cheers Pradosh drm-4 wrote: Hi, prado wrote: But the web hosting company's production server (plesk) also creates the folders with all that standard public_html folder and others once I create a sub-domain. Now I don't want that to happen, I want the sub-domain to exist but without its physical folders. I will be asking the provider for the alternative. I am not sure if I can bypass the sub-domain folders (or some sort of sub-domain redirection to the domain folder) with some htaccess trickery. I am not great in regex so I don't know if it is possible to do this way The only thing that is needed is a ServerAlias in the VirtualHost ... apache configuration for the main domain, preferably a wilcard alias. It would surprise me if Plesk can not handle that. If not, I fear you are stuck, unless you can somehow hook into the generated Apache configuration by Plesk. (It has been about 3 years since I worked with plesk on this level, so I can not help you with that, but if I remember correctly, Plesk includes a host.conf files somewhere per domain where you could put the ServerAlias directive yourself). Gerard -- View this message in context: http://n4.nabble.com/sharing-zend-framework-inside-the-main-domain-from-the-subdoamin-tp955998p956861.html Sent from the Zend Framework mailing list archive at Nabble.com. -- View this message in context: http://n4.nabble.com/sharing-zend-framework-inside-the-main-domain-from-the-subdoamin-tp955998p956873.html Sent from the Zend Framework mailing list archive at Nabble.com. -- View this message in context: http://n4.nabble.com/sharing-zend-framework-inside-the-main-domain-from-the-subdoamin-tp955998p956898.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] ZF Open Source Project: Example of Best Practices?
On Wed, Nov 25, 2009 at 9:52 PM, swilhelm st...@studio831.com wrote: Prompted by Fozzyuw's latest post, I will approach the issue from a different tack. I am looking open source projects that exemplify the best practice use of the Zend Framework and its advanced features. Ideally these projects would: + be under active development + be based on ZF 1.9 + leverage reusable modules + incorporate Auth and ACL (bonus points for OpenId or Facebook Connect support) + provide Zend_Test-based unit tests + deploy from a source repository (e.g. git or svn) + achievs scalability using multiple server load balancing ++ get bonus points they are currently running in production on a cloud platform like EC2 Any recommendations? - Steve W. Hey Steve, one of my clients has a pretty comprehensive ZF application and it also runs on AWS. Unfortunately it's not open source, but I frequently blog about our findings (shameless plug: http://till.klampaeckel.de/blog/plugin/tag/zend-framework) and I'm happy to answer questions if you run into any dead ends or need an opinion. An example for open source software using ZF would be piwik (http://piwik.org). I just updated an installation and noticed that it uses ZF as well. Don't know to which extend though. Another example would be Tine - http://tine20.org. A open source groupware, also written on top of ZF. Then Magento Commerce (http://magentocommerce.com). They use a lot of ZF, but not all of it, or rather, they came up with their own questionable implementations in some cases. ;-) And last but not least, I also read that OXID (another shop system) is currently being rewritten using the ZF. They also have a community edition, so that might be something for you to look at. Oh, and then there's also a webblog system written with ZF (I forgot the name - Ben would know about it), but I'm not sure how far they got or if it currently works anyway. Last time I tried I failed to install it, but I'm sure they progressed. Till
Re: [fw-general] ZF Open Source Project: Example of Best Practices?
Just to quickly throw in my Open Source project: conjoon, a personal information manager build upon Ext JS and Zend Framework. More information here: http://www.conjoon.org It runs on ZF 1.9.4 - the ContextSwitch helper was a life saver when working with JSON encoded responses. There are currently no Unit Tests but I hope I can switch my development process when it comes to include new functionality. -- Thorsten Suckow-Homberg Jakobstrasse 214-216 52064 Aachen http://www.siteartwork.de Tel.: 0151 -10927135 Email: t...@siteartwork.de You should follow me on Twitter: http://twitter.com/ThorstenSuckow Sent with conjoon. Visit http://www.conjoon.org
Re: [fw-general] sharing zend framework inside the main domain from the subdoamin
*Unlike cpanel Plesk creates a separate account with all its httpdocs etc. so you are saying that you create one sub-domain and control all other sub domains via it.* I create the subdomain as a sub-folder as cpanel gives you two options, I use Subdomain on subfolder option. The only small snag is that when you create a subdomain you dont have the option to choose a folder for the root of the sub domain, so after you have created the domain you need to go back in and change the root folder to your master subdomain folder. *So does your index.php direct to the bootstrap/application.php on the main domain?* Yes, it just includes index.php from my main ZF app, I dont use MVC at moment but you would just put your .htaccess in your master subdomain folder I mentioned, this would just be the standard ZF rules - (pointing to index.php in same folder) - index.php will then include zf main run file (index.php) 2009/12/10 prado prados...@hotmail.com: Unlike cpanel Plesk creates a separate account with all its httpdocs etc. so you are saying that you create one sub-domain and control all other sub domains via it. So does your index.php direct to the bootstrap/application.php on the main domain? I have a module www.example.com/blog which I want to point to blog.example.com. So how can I get to that via the index.php on the subdomain. Would that be through a htaccess file with all the rewrite conditions? Daniel Latter wrote: One more thing I should mention is that I use the subdomain part of the domain to distinguish subdomains, and I have a whitelist to. 2009/12/10 Daniel Latter dan.lat...@gmail.com: Well I use plesk and ZF. I have many subdomains running from a single ZF app. Now I cant have wilcard domains which means I will need a subfolder for each domain - this will become unwieldly, so I have a single sub-domain root dir and I just use this for each new subdomain I create. All the dir has init is an index.php file the calls the ZF app, so I only have one dir for all subdomains. Hope this makes sense. Obvioulsy If I could have wild-card domains I would, maybe future versions of Plesk will? 2009/12/10 prado prados...@hotmail.com: same root dir for all subdomains? could you clarify further? thanks Pradosh Daniel Latter wrote: Plesk doesnt support wildcard domains. A possible work around is using the same root dir for all subdomains. Thanks Daniel 2009/12/10 prado prados...@hotmail.com: Thanks Gerard for your help again. I don't have a VPS account, it is just one of those standard shared hosting service. I am using a local company and I can get in touch with the domain manager who is helpful. I know that is my last option to use. thanks anyway! cheers Pradosh drm-4 wrote: Hi, prado wrote: But the web hosting company's production server (plesk) also creates the folders with all that standard public_html folder and others once I create a sub-domain. Now I don't want that to happen, I want the sub-domain to exist but without its physical folders. I will be asking the provider for the alternative. I am not sure if I can bypass the sub-domain folders (or some sort of sub-domain redirection to the domain folder) with some htaccess trickery. I am not great in regex so I don't know if it is possible to do this way The only thing that is needed is a ServerAlias in the VirtualHost ... apache configuration for the main domain, preferably a wilcard alias. It would surprise me if Plesk can not handle that. If not, I fear you are stuck, unless you can somehow hook into the generated Apache configuration by Plesk. (It has been about 3 years since I worked with plesk on this level, so I can not help you with that, but if I remember correctly, Plesk includes a host.conf files somewhere per domain where you could put the ServerAlias directive yourself). Gerard -- View this message in context: http://n4.nabble.com/sharing-zend-framework-inside-the-main-domain-from-the-subdoamin-tp955998p956861.html Sent from the Zend Framework mailing list archive at Nabble.com. -- View this message in context: http://n4.nabble.com/sharing-zend-framework-inside-the-main-domain-from-the-subdoamin-tp955998p956873.html Sent from the Zend Framework mailing list archive at Nabble.com. -- View this message in context: http://n4.nabble.com/sharing-zend-framework-inside-the-main-domain-from-the-subdoamin-tp955998p956898.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] ZF Open Source Project: Example of Best Practices?
-- swilhelm st...@studio831.com wrote (on Wednesday, 09 December 2009, 08:24 PM -0800): Any word from Forest regarding ZF core component use in current release and where find the 2.0 repository? If you're talking the ZF 2.0 repository, it hasn't been created yet. ;) wllm wrote: From what Forrest has told me, he follows Zend's recommendations for best practices to the letter. I'm CC'ing Forrest in so he can say for sure, but he's currently working on getting the code and infrastructure ready for public consumption. ,Wil -Original Message- From: swilhelm [mailto:st...@studio831.com] Sent: Thursday, December 03, 2009 11:40 AM To: fw-general@lists.zend.com Subject: RE: [fw-general] ZF Open Source Project: Example of Best Practices? Thanks Wil. You mentioned Digitalus, http://digitaluscms.com. It seems like it might be the best example open source project running on ZF. They mention version 2.0 is under development and will take advantage of more core ZF components, but I can not find a public source repository containing version 2.0. - Steve W. wllm wrote: Simplecloud.org currently runs on EC2 and the next generation of Digitalus. It's even using components of Zend_Service_Amazon and the Simple Cloud API- it's 'cloud native', so to speak. J I may be able to open-source the code, but I'd have to talk with Forrest (creator/maintainer of DigitalusCMS) first. I'm also working on an app called the Simple Cloud Explorer that is designed to demo SCAPI in action. This will definitely be open-sourced and liberally commented/documented, but I can't make any promises on the release date. ,Wil -- View this message in context: http://n4.nabble.com/ZF-Open-Source-Project-Example-of-Best-Practices-tp 787830p947922.html Sent from the Zend Framework mailing list archive at Nabble.com. -- View this message in context: http://n4.nabble.com/ZF-Open-Source-Project-Example-of-Best-Practices-tp787830p956690.html Sent from the Zend Framework mailing list archive at Nabble.com. -- Matthew Weier O'Phinney Project Lead| matt...@zend.com Zend Framework | http://framework.zend.com/
[fw-general] Adding a # to a URL using gotoRoute
I am trying to use the redirector action helper to call gotoRoute. The page I need to go to is something like http://mywebsite.com/blog/documentation/tags/#add which would take me to the add anchor in the tags page. To go to that URL, my code is: $this-_helper-redirector-gotoRoute(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags')); That takes me to http://mywebsite.com/blog/documentation/tags/ but I need to add #add to the end of that. Any idea how one would accomplish that? Thanks Jason -- Jason Austin Senior Solutions Implementation Engineer NCSU - OIT - Outreach Technology jason_aus...@ncsu.edu
Re: [fw-general] ZF Open Source Project: Example of Best Practices?
wow, pretty nice :) On Thu, Dec 10, 2009 at 7:12 AM, Thorsten Suckow-Homberg t...@siteartwork.de wrote: Just to quickly throw in my Open Source project: conjoon, a personal information manager build upon Ext JS and Zend Framework. More information here: http://www.conjoon.org It runs on ZF 1.9.4 - the ContextSwitch helper was a life saver when working with JSON encoded responses. There are currently no Unit Tests but I hope I can switch my development process when it comes to include new functionality. -- Thorsten Suckow-Homberg Jakobstrasse 214-216 52064 Aachen http://www.siteartwork.de Tel.: 0151 -10927135 Email: t...@siteartwork.de You should follow me on Twitter: http://twitter.com/ThorstenSuckow Sent with conjoon. Visit http://www.conjoon.org
[fw-general] associative array in url
Hi, Is there a way to pass an associative array via URL to the request object? This /controller/action/arr/foo/arr/bar would be converted to $arr == array(foo, bar); and I would like to pass something like /controller/action/arr[foo1]/bar/arr[foo2]/bar so I would have $arr == array (foo1 = bar, foo1 = bar) Reason is simple: I have a table, where table header is used among other things to sort the DB results. I want to be able to sort by multiple columns and I'm looking for a way how to tell my scripts that the first column should be sorted in DESC, the sekond one in ASC. So basically I need to create an URL, which would result in calling the $this-getRequest()-getParams() in my controller with result for example array('_sort' = array('column1' = 'desc', 'column2' = 'asc')); . Or is there a better approach on this issue? Thanks for your time Regards Jan
Re: [fw-general] Adding a # to a URL using gotoRoute
The gotoRoute() method doesn't support hashes, but you can accomplish this by using the url action helper to construct the url based on your route, and then concatenate your hash to it. Then call the redirector's gotoUrl method: $url = $this-_helper-url-url(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags')); $url .= #add; $this-_helper-redirector-gotoUrl($url); -- Hector On Wed, Dec 9, 2009 at 1:51 PM, Jason Austin jason_aus...@ncsu.edu wrote: I am trying to use the redirector action helper to call gotoRoute. The page I need to go to is something like http://mywebsite.com/blog/documentation/tags/#add which would take me to the add anchor in the tags page. To go to that URL, my code is: $this-_helper-redirector-gotoRoute(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags')); That takes me to http://mywebsite.com/blog/documentation/tags/ but I need to add #add to the end of that. Any idea how one would accomplish that? Thanks Jason -- Jason Austin Senior Solutions Implementation Engineer NCSU - OIT - Outreach Technology jason_aus...@ncsu.edu
[fw-general] CLI/CRON/BATCH
Hi Everyone, I have been looking far and wide through every possible search engine and cannot find some template that I can use to write a CRON/BATCH/CLI process that uses the Zend Framework. Everyone has a different opinion on what is correct. *Ok, I can manage to hack something together, but would like to do it the correct way. If someone has written some batch cli processes, please assist in guiding me in the right direction. Basics that will be needed, I think is some bootstrap that will setup the Autoloader and Setup the required resources etc. - Don't see the need to gain access to view and controllers (whole MVC stack) Any help will be appreciated. Jaco Olivier Please consider the environment before printing this email. This transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please delete it and notify the sender. The content of this e-mail is the opinion of the writer only and is not endorsed by Sabinet Online Limited unless expressly stated otherwise.
Re: [fw-general] Adding a # to a URL using gotoRoute
Funny that you posted this because I have the same issue I was about to tackle with a comments anchor. I hope you get a good response. I will let you know if I find out anything. On Wed, Dec 9, 2009 at 4:51 PM, Jason Austin jason_aus...@ncsu.edu wrote: I am trying to use the redirector action helper to call gotoRoute. The page I need to go to is something like http://mywebsite.com/blog/documentation/tags/#add which would take me to the add anchor in the tags page. To go to that URL, my code is: $this-_helper-redirector-gotoRoute(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags')); That takes me to http://mywebsite.com/blog/documentation/tags/ but I need to add #add to the end of that. Any idea how one would accomplish that? Thanks Jason -- Jason Austin Senior Solutions Implementation Engineer NCSU - OIT - Outreach Technology jason_aus...@ncsu.edu
Re: [fw-general] associative array in url
You can do this using a good ol' query string: /controller/action?sort[column1]=descsort[column2]=asc You should be able to access those using the request object: $sort = $this-_request-getParam('sort'); -- Hector 2009/12/10 WebCorp s.r.o. | Jan Juříček jan.juri...@webcorp.cz Hi, Is there a way to pass an associative array via URL to the request object? This /controller/action/arr/foo/arr/bar would be converted to $arr == array(foo, bar); and I would like to pass something like /controller/action/arr[foo1]/bar/arr[foo2]/bar so I would have $arr == array (foo1 = bar, foo1 = bar) Reason is simple: I have a table, where table header is used among other things to sort the DB results. I want to be able to sort by multiple columns and I’m looking for a way how to tell my scripts that the first column should be sorted in DESC, the sekond one in ASC… So basically I need to create an URL, which would result in calling the $this-getRequest()-getParams() in my controller with result for example array('_sort' = array('column1' = 'desc', 'column2' = 'asc')); … Or is there a better approach on this issue? Thanks for your time *Regards* *Jan***
Re: [fw-general] Adding a # to a URL using gotoRoute
Maybe one could add a target to the gotoRoute method in the future. I can't believe that people don't need to do something like this often. Similar to $url = $this-_helper-url-url(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags', 'anchor' ='comments')); On Thu, Dec 10, 2009 at 1:02 PM, Hector Virgen djvir...@gmail.com wrote: The gotoRoute() method doesn't support hashes, but you can accomplish this by using the url action helper to construct the url based on your route, and then concatenate your hash to it. Then call the redirector's gotoUrl method: $url = $this-_helper-url-url(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags')); $url .= #add; $this-_helper-redirector-gotoUrl($url); -- Hector On Wed, Dec 9, 2009 at 1:51 PM, Jason Austin jason_aus...@ncsu.eduwrote: I am trying to use the redirector action helper to call gotoRoute. The page I need to go to is something like http://mywebsite.com/blog/documentation/tags/#add which would take me to the add anchor in the tags page. To go to that URL, my code is: $this-_helper-redirector-gotoRoute(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags')); That takes me to http://mywebsite.com/blog/documentation/tags/ but I need to add #add to the end of that. Any idea how one would accomplish that? Thanks Jason -- Jason Austin Senior Solutions Implementation Engineer NCSU - OIT - Outreach Technology jason_aus...@ncsu.edu
Re: [fw-general] Adding a # to a URL using gotoRoute
It should be possible to extend the redirector helper to create your own that accepts a hash as the 5th parameter. Since the action helper broker uses a LIFO stack, you can even use the same helper name redirector. -- Hector On Thu, Dec 10, 2009 at 10:06 AM, Fred Jiles fredji...@gmail.com wrote: Maybe one could add a target to the gotoRoute method in the future. I can't believe that people don't need to do something like this often. Similar to $url = $this-_helper-url-url(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags', 'anchor' ='comments')); On Thu, Dec 10, 2009 at 1:02 PM, Hector Virgen djvir...@gmail.com wrote: The gotoRoute() method doesn't support hashes, but you can accomplish this by using the url action helper to construct the url based on your route, and then concatenate your hash to it. Then call the redirector's gotoUrl method: $url = $this-_helper-url-url(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags')); $url .= #add; $this-_helper-redirector-gotoUrl($url); -- Hector On Wed, Dec 9, 2009 at 1:51 PM, Jason Austin jason_aus...@ncsu.eduwrote: I am trying to use the redirector action helper to call gotoRoute. The page I need to go to is something like http://mywebsite.com/blog/documentation/tags/#add which would take me to the add anchor in the tags page. To go to that URL, my code is: $this-_helper-redirector-gotoRoute(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags')); That takes me to http://mywebsite.com/blog/documentation/tags/ but I need to add #add to the end of that. Any idea how one would accomplish that? Thanks Jason -- Jason Austin Senior Solutions Implementation Engineer NCSU - OIT - Outreach Technology jason_aus...@ncsu.edu
Re: [fw-general] associative array in url
You could also serialize the array, base64_encode it, and then pass it as a single parameter to your controller. Then reverse the process. Mark 2009/12/10 WebCorp s.r.o. | Jan Juříček jan.juri...@webcorp.cz: Hi, Is there a way to pass an associative array via URL to the request object? This /controller/action/arr/foo/arr/bar would be converted to $arr == array(foo, bar); and I would like to pass something like /controller/action/arr[foo1]/bar/arr[foo2]/bar so I would have $arr == array (foo1 = bar, foo1 = bar) Reason is simple: I have a table, where table header is used among other things to sort the DB results. I want to be able to sort by multiple columns and I'm looking for a way how to tell my scripts that the first column should be sorted in DESC, the sekond one in ASC... So basically I need to create an URL, which would result in calling the $this-getRequest()-getParams() in my controller with result for example array('_sort' = array('column1' = 'desc', 'column2' = 'asc')); ... Or is there a better approach on this issue? Thanks for your time Regards Jan -- - Mark Steudel P: 206.375.7244 msteu...@gmail.com . : Work : . http://www.mindfulinteractive.com . : Play : . http://www.steudel.org/blog
[fw-general] Zend_Feed - sending proper headers
How to send feeds properly? I want browser read whole file, only if it has new entries. I read data from the database. Limit result to 15 items. Then create an array and pass it to the Zend_Feed. Shall I cache the above steps with Zend_Cache + very long lifetime, and use a cache tag, clean cache entries by tag when new article is posted? Then, is it enough to use send() method? Do browsers read last-modified entry from the feed itself, or only from the HTTP headers? -- regards takeshin -- View this message in context: http://n4.nabble.com/Zend-Feed-sending-proper-headers-tp960516p960516.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Adding a # to a URL using gotoRoute
Thanks guys. The most straight forward way was using the URL helper, adding the hash to the end of the URL, then using gotoUrl(). One caveat was that I had to do the following to not get the baseUrl() to be added twice: $this-_helper-redirector-setPrependBase('')-gotoUrl($this-_helper-url-url(array(..options...), 'default', true) . '#hash'); If you don't setPrependBase to '' in the redirector you will get something like http://mywebsite.com/subdir/subdir/module/... instead of http://mywebsite.com/subdir/module/... Hope this helps. I smell a feature request for adding hashes to routes url helpers :) Thanks! Jason On Thu, Dec 10, 2009 at 1:09 PM, Hector Virgen djvir...@gmail.com wrote: It should be possible to extend the redirector helper to create your own that accepts a hash as the 5th parameter. Since the action helper broker uses a LIFO stack, you can even use the same helper name redirector. -- Hector On Thu, Dec 10, 2009 at 10:06 AM, Fred Jiles fredji...@gmail.com wrote: Maybe one could add a target to the gotoRoute method in the future. I can't believe that people don't need to do something like this often. Similar to $url = $this-_helper-url-url(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags', 'anchor' ='comments')); On Thu, Dec 10, 2009 at 1:02 PM, Hector Virgen djvir...@gmail.com wrote: The gotoRoute() method doesn't support hashes, but you can accomplish this by using the url action helper to construct the url based on your route, and then concatenate your hash to it. Then call the redirector's gotoUrl method: $url = $this-_helper-url-url(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags')); $url .= #add; $this-_helper-redirector-gotoUrl($url); -- Hector On Wed, Dec 9, 2009 at 1:51 PM, Jason Austin jason_aus...@ncsu.edu wrote: I am trying to use the redirector action helper to call gotoRoute. The page I need to go to is something like http://mywebsite.com/blog/documentation/tags/#add which would take me to the add anchor in the tags page. To go to that URL, my code is: $this-_helper-redirector-gotoRoute(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags')); That takes me to http://mywebsite.com/blog/documentation/tags/ but I need to add #add to the end of that. Any idea how one would accomplish that? Thanks Jason -- Jason Austin Senior Solutions Implementation Engineer NCSU - OIT - Outreach Technology jason_aus...@ncsu.edu -- Jason Austin Senior Solutions Implementation Engineer NCSU - OIT - Outreach Technology jason_aus...@ncsu.edu
Re: [fw-general] Zend_Feed - sending proper headers
You'll want to use a mix of server-side caching and client-side caching. The server-side caching can be done with Zend_Cache. That way if two separate users try to access the feed, your application only needs to build it once. For client-side caching, you'll need to analyze the request and send the correct response headers. I use something like this: public function viewAction() { $request = $this-getRequest(); $response = $this-getResponse(); // Enable browser caching $response-setHeader('Cache-Control', 'private, max-age=10800, pre-check=10800', true); $response-setHeader('Pragma', 'private', true); $response-setHeader('Expires', date(DATE_RFC822, strtotime(' 2 day')), true); // Check for client cache if (null !== ($modified = $request-getServer('HTTP_IF_MODIFIED_SINCE'))) { // User has cached page, send 304 not modified header $response-setHeader('Last-Modified', $modified, true); $response-setHttpResponseCode(304); } else { // User does not have cached page, build response body */* Your server-side caching code goes here */* * $response-setBody($feed);* } // Send response $response-sendResponse(); exit; } I hope this helps. -- Hector On Thu, Dec 10, 2009 at 12:48 PM, takeshin admi...@gmail.com wrote: How to send feeds properly? I want browser read whole file, only if it has new entries. I read data from the database. Limit result to 15 items. Then create an array and pass it to the Zend_Feed. Shall I cache the above steps with Zend_Cache + very long lifetime, and use a cache tag, clean cache entries by tag when new article is posted? Then, is it enough to use send() method? Do browsers read last-modified entry from the feed itself, or only from the HTTP headers? -- regards takeshin -- View this message in context: http://n4.nabble.com/Zend-Feed-sending-proper-headers-tp960516p960516.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Different module for a different domain?
Is there any simple way of using a different module when accessing a site through specific domain? At this time, I have two modules setup and running: front and admin. front is default. admin is through /admin/. Now I want to add a third called something like ssl that will load for any access to myssl.comdomain. --- Philip g...@gpcentre.net http://www.gpcentre.net/
Re: [fw-general] Adding a # to a URL using gotoRoute
I can see this being useful to many people, too. Maybe instead of a 5th parameter, there can be a setHash() method. So usage would be like this: $redirector = $this-_helper-redirector; $redirector-gotoRoute(/* ... */); *$redirector-setHash('add');* $redirector-redirectAndExit(); -- Hector On Thu, Dec 10, 2009 at 11:53 AM, Jason Austin jason_aus...@ncsu.eduwrote: Thanks guys. The most straight forward way was using the URL helper, adding the hash to the end of the URL, then using gotoUrl(). One caveat was that I had to do the following to not get the baseUrl() to be added twice: $this-_helper-redirector-setPrependBase('')-gotoUrl($this-_helper-url-url(array(..options...), 'default', true) . '#hash'); If you don't setPrependBase to '' in the redirector you will get something like http://mywebsite.com/subdir/subdir/module/... instead of http://mywebsite.com/subdir/module/... Hope this helps. I smell a feature request for adding hashes to routes url helpers :) Thanks! Jason On Thu, Dec 10, 2009 at 1:09 PM, Hector Virgen djvir...@gmail.com wrote: It should be possible to extend the redirector helper to create your own that accepts a hash as the 5th parameter. Since the action helper broker uses a LIFO stack, you can even use the same helper name redirector. -- Hector On Thu, Dec 10, 2009 at 10:06 AM, Fred Jiles fredji...@gmail.com wrote: Maybe one could add a target to the gotoRoute method in the future. I can't believe that people don't need to do something like this often. Similar to $url = $this-_helper-url-url(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags', 'anchor' ='comments')); On Thu, Dec 10, 2009 at 1:02 PM, Hector Virgen djvir...@gmail.com wrote: The gotoRoute() method doesn't support hashes, but you can accomplish this by using the url action helper to construct the url based on your route, and then concatenate your hash to it. Then call the redirector's gotoUrl method: $url = $this-_helper-url-url(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags')); $url .= #add; $this-_helper-redirector-gotoUrl($url); -- Hector On Wed, Dec 9, 2009 at 1:51 PM, Jason Austin jason_aus...@ncsu.edu wrote: I am trying to use the redirector action helper to call gotoRoute. The page I need to go to is something like http://mywebsite.com/blog/documentation/tags/#add which would take me to the add anchor in the tags page. To go to that URL, my code is: $this-_helper-redirector-gotoRoute(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags')); That takes me to http://mywebsite.com/blog/documentation/tags/ but I need to add #add to the end of that. Any idea how one would accomplish that? Thanks Jason -- Jason Austin Senior Solutions Implementation Engineer NCSU - OIT - Outreach Technology jason_aus...@ncsu.edu -- Jason Austin Senior Solutions Implementation Engineer NCSU - OIT - Outreach Technology jason_aus...@ncsu.edu
Re: [fw-general] Different module for a different domain?
Have you tried creating a Hostname route? http://framework.zend.com/manual/en/zend.controller.router.html#zend.controller.router.routes.hostname -- Hector On Thu, Dec 10, 2009 at 1:28 PM, Philip G g...@gpcentre.net wrote: Is there any simple way of using a different module when accessing a site through specific domain? At this time, I have two modules setup and running: front and admin. front is default. admin is through /admin/. Now I want to add a third called something like ssl that will load for any access to myssl.comdomain. --- Philip g...@gpcentre.net http://www.gpcentre.net/
Re: [fw-general] Adding a # to a URL using gotoRoute
That's a good point. Making it a reserved word would make a lot of sense, but I'd be afraid of breaking sites that already use anchor (like maybe an Anchors R Us website that sells anchors for ships?) Hash may also already be in use by some sites. But I really like the idea, maybe you should open a feature request to get some more input on the implementation. -- Hector On Thu, Dec 10, 2009 at 1:49 PM, Jason Austin jason_aus...@ncsu.edu wrote: Possibly. Although I think its more than just a redirector helper issue, as the url view and action helpers also don't account for the hash. That's why I was thinking it should happen at the route level, where 'module', 'controller', and 'action' are reserved words, you could do the same with 'anchor' or 'hash'. So you would build the following URL: http://mywebsite.com/blog/documentation/tags/#add like: $routeArgs = array( 'module' = 'blog', 'controller' = 'documentation', 'action' = 'tags', 'anchor' = 'add', ); $this-_helper-redirector-gotoRoute($routeArgs); or in the view like: $this-view-url($routeArgs); so they both would build the URL the same way. Thoughts? - Jason On Thu, Dec 10, 2009 at 4:31 PM, Hector Virgen djvir...@gmail.com wrote: I can see this being useful to many people, too. Maybe instead of a 5th parameter, there can be a setHash() method. So usage would be like this: $redirector = $this-_helper-redirector; $redirector-gotoRoute(/* ... */); $redirector-setHash('add'); $redirector-redirectAndExit(); -- Hector On Thu, Dec 10, 2009 at 11:53 AM, Jason Austin jason_aus...@ncsu.edu wrote: Thanks guys. The most straight forward way was using the URL helper, adding the hash to the end of the URL, then using gotoUrl(). One caveat was that I had to do the following to not get the baseUrl() to be added twice: $this-_helper-redirector-setPrependBase('')-gotoUrl($this-_helper-url-url(array(..options...), 'default', true) . '#hash'); If you don't setPrependBase to '' in the redirector you will get something like http://mywebsite.com/subdir/subdir/module/... instead of http://mywebsite.com/subdir/module/... Hope this helps. I smell a feature request for adding hashes to routes url helpers :) Thanks! Jason On Thu, Dec 10, 2009 at 1:09 PM, Hector Virgen djvir...@gmail.com wrote: It should be possible to extend the redirector helper to create your own that accepts a hash as the 5th parameter. Since the action helper broker uses a LIFO stack, you can even use the same helper name redirector. -- Hector On Thu, Dec 10, 2009 at 10:06 AM, Fred Jiles fredji...@gmail.com wrote: Maybe one could add a target to the gotoRoute method in the future. I can't believe that people don't need to do something like this often. Similar to $url = $this-_helper-url-url(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags', 'anchor' ='comments')); On Thu, Dec 10, 2009 at 1:02 PM, Hector Virgen djvir...@gmail.com wrote: The gotoRoute() method doesn't support hashes, but you can accomplish this by using the url action helper to construct the url based on your route, and then concatenate your hash to it. Then call the redirector's gotoUrl method: $url = $this-_helper-url-url(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags')); $url .= #add; $this-_helper-redirector-gotoUrl($url); -- Hector On Wed, Dec 9, 2009 at 1:51 PM, Jason Austin jason_aus...@ncsu.edu wrote: I am trying to use the redirector action helper to call gotoRoute. The page I need to go to is something like http://mywebsite.com/blog/documentation/tags/#add which would take me to the add anchor in the tags page. To go to that URL, my code is: $this-_helper-redirector-gotoRoute(array('module' = 'blog', 'controller' = 'documentation', 'action' = 'tags')); That takes me to http://mywebsite.com/blog/documentation/tags/ but I need to add #add to the end of that. Any idea how one would accomplish that? Thanks Jason -- Jason Austin Senior Solutions Implementation Engineer NCSU - OIT - Outreach Technology jason_aus...@ncsu.edu -- Jason Austin Senior Solutions Implementation Engineer NCSU - OIT - Outreach Technology jason_aus...@ncsu.edu -- Jason Austin Senior Solutions Implementation Engineer NCSU - OIT - Outreach Technology jason_aus...@ncsu.edu
Re: [fw-general] Zend_Navigation in application.ini in ralphschindler's webninar
This thread is a few months old, but I'd rather put it here than start a new one, in case someone else stumbles across it. While I'm good on using an XML file, how would I make an INI if I wanted to use an INI file instead of XML? Lets say I have this simple XML file, what would the INI file look like? ?xml version=1.0 encoding=UTF-8? configdata nav home labelHome/label uri//uri /home products labelProducts/label uri/products//uri pages widgets labelWidgets/label uri/products/widgets//uri /widgets sprockets labelSprockets/label uri/products/sprockets//uri /sprockets /pages /products aboutus labelAbout Us/label uri/company/aboutus//uri /aboutus /nav /configdata Likewise, my Bootstrap.php class initalizes the XML file Zend_Navigation like this: $config = new Zend_Config_Xml(APPLICATION_PATH . '/configs/navigation_uri.xml', 'nav'); $navigation = new Zend_Navigation($config); $view-navigation($navigation); How would that change if I was going to use the the new INI file? I tried this, but it's not working and I'm not sure where my understanding is failing: $config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/navigation_uri.ini'); $navigation = new Zend_Navigation($config); $view-navigation($navigation); configdata.nav.home.label = Home configdata.nav.home.uri = / configdata.nav.products.label = Products configdata.nav.products.uri = /products/ configdata.nav.products.pages.widgets.label = Widgets configdata.nav.products.pages.widgets.uri = /products/widgets/ configdata.nav.products.pages.sprockets.label = Sprockets configdata.nav.products.pages.sprockets.uri = /products/prockets/ configdata.nav.aboutus.label = About Us configdata.nav.aboutus.uri = /company/aboutus/ Cheers! -- View this message in context: http://n4.nabble.com/Zend-Navigation-in-application-ini-in-ralphschindler-s-webninar-tp661093p960632.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Adding a # to a URL using gotoRoute
Jason Austin wrote: Hope this helps. I smell a feature request for adding hashes to routes url helpers :) +1 -- takeshin -- View this message in context: http://n4.nabble.com/Adding-a-to-a-URL-using-gotoRoute-tp957210p960642.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Adding a # to a URL using gotoRoute
+1 On 10 Dec 2009, at 22:54, takeshin admi...@gmail.com wrote: Jason Austin wrote: Hope this helps. I smell a feature request for adding hashes to routes url helpers :) +1 -- takeshin -- View this message in context: http://n4.nabble.com/Adding-a-to-a-URL-using-gotoRoute-tp957210p960642.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Adding a # to a URL using gotoRoute
isn't the use of named anchors deprecated? On Fri, Dec 11, 2009 at 7:23 AM, Daniel Latter dan.lat...@gmail.com wrote: +1 On 10 Dec 2009, at 22:54, takeshin admi...@gmail.com wrote: Jason Austin wrote: Hope this helps. I smell a feature request for adding hashes to routes url helpers :) +1 -- takeshin -- View this message in context: http://n4.nabble.com/Adding-a-to-a-URL-using-gotoRoute-tp957210p960642.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Adding a # to a URL using gotoRoute
The name attribute is deprecated in XHTML, in favor of the id attribute (which behaves like the old name attribute did). -- Hector On Thu, Dec 10, 2009 at 5:17 PM, Cameron themsel...@gmail.com wrote: isn't the use of named anchors deprecated? On Fri, Dec 11, 2009 at 7:23 AM, Daniel Latter dan.lat...@gmail.comwrote: +1 On 10 Dec 2009, at 22:54, takeshin admi...@gmail.com wrote: Jason Austin wrote: Hope this helps. I smell a feature request for adding hashes to routes url helpers :) +1 -- takeshin -- View this message in context: http://n4.nabble.com/Adding-a-to-a-URL-using-gotoRoute-tp957210p960642.html Sent from the Zend Framework mailing list archive at Nabble.com.