[symfony-users] Re: AJAX in SF1.2
http://www.symfony-project.org/book/1_2/11-Ajax-Integration HAUSa wrote: I guess all documentation about Ajax is only for version 1.0? Al things I tried from the book and Easy AJAX tutorial just won't work. Is there SF1.2 AJAX documentation? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Square Facebook type thumbnail
You will need a little JavaScript to select the region of the image client-side. Server-side, it's a single function call: http://us.php.net/imagecopyresized Kind regards, Dan Grossman http://www.dangrossman.info Tom Haskins-Vaughan wrote: Has anybody by any chance created a module that creates a square thumbnail (like on Facebook) from an uploaded image that they are willing to share? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Credit Card processing
Your client will need to establish a merchant account for internet processing. If they have an account and terminal for retail processing, they can't use that for online processing without approval from the provider or bank. Internet transactions have to be processed with the appropriate code indicating they're MOTO/internet originated. A bank or other service provider that provides merchant accounts will almost always provide an account with a gateway service at the same time, although it's possible to get them separately. The gateway is what connects your website to the banking network to process credit cards. It will provide some API for you to send the payment information, and in response tells you whether the transaction was accepted or declined and various associated information (like codes corresponding to decline reasons, depending on the API again). If it's a popular gateway, maybe someone's written a plugin. I use the Authorize.net gateway with my merchant accounts and just dropped a class into my lib directory which encapsulates all the API calls to charge a credit card or initiate a subscription. I hope that overview sets you down the right path. Kind regards, Dan Grossman http://www.dangrossman.info Ant Cunningham wrote: Id recommend using whoever their bank uses for terminal service. Ours uses YourPay/Linkpoint for example. (http://www.yourpay.com/) On 11/5/07 2:51 PM, Tom Haskins-Vaughan [EMAIL PROTECTED] wrote: Hi, one of my clients is looking for credit card processing on a site. I've never done it before, and I was wondering if anyone could point me in the right direction, also if there is a plugin for symfony. It is for a US client. TIA Tom --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How to handle application/xml submitted via POST?
An HTTP POST is always of the form field=data, so use $this-getRequestParameter('field') like you would for any other POSTed action. drmikecrowe wrote: Folks, Let me explain more: My remote application is sending a POST, with a content type application/xml. The contents of the post are something like: data application param1help/param /application application param1file/param /application /data My question is: When a post comes in in that manner, is it visible within symfony? To get it now, I do: $stream = fopen(php://input, r); $data = stream_get_contents($stream); fclose($stream); TIA Mike On Oct 20, 3:17 pm, Ian P. Christian [EMAIL PROTECTED] wrote: drmikecrowe wrote: Sorry, that's backwords: I need to process an application/xml upload from symfony. I don't understand your question still - handling it how? An upload is an upload, regardless of it's mimetype, you can save it to file or whatever you like. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Symfony allows multiple urls to the same content...
This is just the nature of how web servers work. You can write a filter to look at the URL and make up errors if you want. It's not an issue for SEO. Search engines don't make up URLs, they follow links, so unless you link to the same content with all 4 URLs, they'll only know about one way to access each page. Jonathan Franks wrote: I have read often that search engines don't like to find the same content accessible from multiple urls. But I notice that in my application this is happening I have a symfony routing rule to make my homepage index.html As such, I can reach my home page with ... www.mysite.com/ www.mysite.com/index.html This is as expected and not a problem. However, I can also reach the same page with... www.mysite.com/index.php www.mysite.com/index.php/ --- html loads but assets broken I think both the above should return a 404 Also it is possible to reach every page in my frontend in two ways www.mysite.com/somepage.html --- this page I want www.mysite.com/index.php/somepage.html--- this page should return a 404 Likewise, surely a symfony page with this type of url... www.mysite.com/xyz/xyz/xyz should not be available under this as well... www.mysite.com/xyz/xyz/xyz/ Am I doing something wrong?? Is it important anyway? Thanks Jonathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Developer tools
Windows Vista Eclipse w/ PDT IE7, FF2, Safari3, Opera9, XP+IE6 VPC TortoiseSVN / CVSDude.com hosted SVN repository Occasionally I'll use Visual Studio 2005 with VS.PHP when I'm tired of Eclipse acting up. ~ Dan Grossman http://www.dangrossman.info Tom Haskins-Vaughan wrote: Hi this might have been done already so feel free to point me to an existing thread but if not here goes. I'm intrigued to find out what people use to develop symfony with. Here are my tools: Platform: Fedora 7 Linux (considering moving to Mac) Text editor/IDE: Bluefish (considering moving to TextMate) Primary test browser: Friefox 2 with developer plugin Feel free to add categories. Tom --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: different configuration between local and live machines
Create different environments for each, and if you can't be bothered to switch a variable indicating which environment you're using somewhere between the two servers, write a snippet to detect it from the URL/hostname. http://www.symfony-project.com/book/1_0/05-Configuring-Symfony#Environments Jonathan Bryan wrote: As well as the database settings, I have a number of other settings that need to change depending on whether they are on the live server or my local development machine. (for instance, for turning distant analytics on/off) I can't find any recommended way of doing this in the symfony docs. It must be a common problem, so I wonder if I'm missing something obvious?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Getting the content from an action success....
getPresentationFor http://www.symfony-project.com/api/1_0/sfController - Dan Jonathan Franks wrote: Hi, A long time ago I read somewhere on the Symfony site (but I forgot where) about a function to grab the output from an action. So you could write something like this... $content = getOutput('module name', 'action name'); Was I dreaming? if not, can someone remind me of how this is done? thanks // Jonathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: .htaccess file not working
mod_rewrite has no problem with periods... but you have rules specifically dealing with them. Did you read the comments (ex we skip all files with .something)? ;) Carl Vondrick wrote: On Friday, September 28, 2007, Carl Vondrick wrote: A .htaccess file for a certain application is not working for me. After banging my head around for a while, I realized that it was because the project had a dot in the name. I guess mod_rewrite doesn't like periods! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Propel doSelectJoin*() not actually doing joins?!
When you're talking about MySQL, adding a WHERE clause on the foreign key is almost always identical to performing an inner join. I don't see this behavior as incorrect at all. A left outer join is never the default join type, so it *should* have to be explicitly specified. Simon Roby wrote: On 9/27/07, Nicolas Dhomont [EMAIL PROTECTED] wrote: I don't know why it's coded like this but you can write your own doSelectJoin*() functions (with left join inside). I know, but that would be a waste of time better spent fixing Propel itself. After searching Propel's Trac I found this: http://propel.phpdb.org/trac/ticket/478 however it appears to be applicable only to Propel 1.3 (I see no generator/classes/propel/engine/builder/om/php5 path in symfony/vendor/propel). Anyway I guess I should be asking the Propel list instead, as this isn't really a symfony issue. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Output an excel file from an action
I assume you need to call some method of $objWriter, like the line you commented out, for it to actually output the file. Right now your action has no output, you're sending nothing but the headers back. nico_bl1nd wrote: Hi Anakreon, I'm facing a similar problem. I've made a simple export action and added the demo code from PHP Excel, everything seems ok, the file is sent to my computer, but it's completely empty. Could you paste your PHPExcel code here ? I don't know how to save the Excel. mine is the following : My action : // Create new PHPExcel object $objPHPExcel = new PHPExcel(); // Set properties $objPHPExcel-getProperties()-setCreator(Maarten Balliauw); $objPHPExcel-getProperties()-setLastModifiedBy(Maarten Balliauw); $objPHPExcel-getProperties()-setTitle(Office 5 XLSX Test Document); $objPHPExcel-getProperties()-setSubject(Office 5 XLSX Test Document); $objPHPExcel-getProperties()-setDescription(Test document for Office 5, generated using PHP classes.); // Add some data $objPHPExcel-setActiveSheetIndex(0); $objPHPExcel-getActiveSheet()-SetCellValue('A1', 'Hello'); $objPHPExcel-getActiveSheet()-SetCellValue('B2', 'world!'); $objPHPExcel-getActiveSheet()-SetCellValue('C1', 'Hello'); $objPHPExcel-getActiveSheet()-SetCellValue('D2', 'world!'); // Rename sheet $objPHPExcel-getActiveSheet()-setTitle('Simple'); $this-getResponse()-clearHttpHeaders(); header('Content-Type: ' . 'application/vnd.ms-excel'); header('Content-Disposition: attachment; filename=export12.xls'); // Save Excel 2007 file $objWriter = new PHPExcel_Writer_Excel5($objPHPExcel); // $objWriter-save(php://output); return sfView::HEADER_ONLY; My view.yml exportSuccess: has_layout: false thanks for your help Nicolas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Zend Guard and Symfony can't work together?
So you think all software sold in retail stores is immoral? It's all obfuscated through compilation, which protects the authors from theft of their code by competitors... Bjorn Wijers wrote: Cipher Chien, No offense, but obfuscating files with an external commercial third party program and expecting an open source based platform to be able to handle this without taking any steps from you seems silly to me. rant Personally I applaud any extra step to make it harder to use Symfony or any other platform for those obfuscating source code. Obfuscating source code is IMHO a silly thing to do, both technically and morally and I wouldn't put any energy into. /rant All the best, grtz BjornW Cipher Chien wrote: Haha... I found some topic about this and tried out the solution by my self. The steps are below: 1. In Zend Guard setting subpage, Obfuscation, the Obfuscation Level can't be Strong. 2. Find or create autoload.yml in apps level config directory. (exp: project/apps/frontend/config/). and add setting in autoload.yml. for example: I have a encrypt file in /project/apps/frontend/lib/ abc.class.php . my autoload.yml setting should be autoload: myClass: name: myClass ext:.php files: abc: %SF_APP_LIB_DIR%/abc.class.php 3. Flush symfony cache ,reload your page and done. Why should we do these extra actions after we encrypt our symfony code? because symfony can't autoload these encrypt files. If you have thousands file to encryptcongratulation! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Issues with Create/Edit/Save actions
Not from the controller. But you can make this string you want to append available to the view from the controller, then in the view, print out a title tag which contains the title from view.yml and your extra string instead of using the helper method for printing a title. Ex: title?php echo $this-getContext()-getResponse()-getTitle(); ? ?php echo isset($title_extra) ? ' - ' . $title_extra : ''; ?/title Nicolas Perriault wrote: Nicolas Dhomont wrote: public function executeCreate() { * $this-getResponse()-setTitle('blah'); * return $this-forward('content', 'edit'); } BTW is there a simple way to append a string to an existing title (defined in the view.yml file) in the response ? My problem is that in the controller the sfResponse::getTitle method always returns an empty string... :( ++ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Determining GMT offset of a timezone
This isn't Symfony specific, but thought one of ya PHP gurus might be able to help. I have some time zone strings (ex: America/New_York or Europe/London), and want to find the GMT offset of that timezone, *without DST adjustments*. In other words, the offset (like GMT -5) that I print should be consistent throughout the year. The first part I've figured out; how to easily remove DST adjustments I haven't. For example, for Europe/London, I get GMT+1 right now, where I want GMT+0, as it will be during London's winter. $dateTimeZone = new DateTimeZone($timeZoneString); $dateTime = new DateTime(now, $dateTimeZone); $offset = $dateTimeZone-getOffset($dateTime); if ($offset != 0) { $offset = $offset / (60 * 60); //converts to hours } Switching the timezone setting with date_default_timezone_set() or putenv('TZ=') can have side-effects, so something that doesn't involve tricking the thread into thinking it's in a different timezone would be best. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: SteelGuru V2 built on Symfony
You know, there was nothing so original in my e-mail about W3Counter that you had to copy it. You should've at least changed the link to point to your site rather than just the text ;) Regards, Dan Grossman Awio Web Services LLC Birchandra Singh wrote: Dear all, SteelGuru v2 (http://www.steelguru.com) is now online. The latest version of this popular site is built on the Symfony framework (1.0.2). It subscribes daily e-newsletter (namely Steel Trade Today) related to steel, iron, ore so on over 4 subscribers daily. Thanks Symfony for making it so easy and fast. -- Birchandra Sanasam Web Developer Analyst # +91 9810 194978 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Javascript on another server?
More than 90% of all webpages contain JavaScript that resides on another server. That's how Google AdSense, every web tracker/hit counter, and virtually all 3rd party ad network works. Florian Klug wrote: hi, On Thursday 07 June 2007 19:02, Eno wrote: Our javascript files live on another server (along with all of our images) and Im trying to integrate a rich text editor into our application. I don't think that's a symfony issue, because afaik browsers don't execute javascript from any other server than the one which serves the page. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: FYI: Symfony Benchmark
Wonder what the results would've been if he was using an opcode cache and ran sfOptimizerPlugin over the project beforehand. I'm seeing virtually 100% cache hits with APC and Symfony: http://www.w3counter.com/apc.php Piers Warmers wrote: Thanks for the link Grimoire. Nicely presented research. I'd love to some of the code used in these tests. I know from my experiences with frameworks, stylistic coding changes can have a huge bearing on speed. For me, I found my original Symfony Apps were much slower than my latest. I think that is due to: - My better usage of the cache - More streamlined / lean model usage - I try and minimize access to joined table. Especially in listing pages. - I watch the number of DB queries like a hawk. I try and keep it as low as possible. Anything above 2-3 for a popular script, and I get worried. But the again, I also wrap aluminum foil around my head so : ) - I've mostly stopped using the Admin generator. I find it way, way too verbose for my liking. So what have others found? how do you optimize you Symfony Apps? - Piers http://www.alrond.com/en/2007/jan/25/performance-test-of-6-leading- frameworks/ Bad marketing for our lovely framework. -- Grimoire Guru SourceMage GNU/Linux --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: W3Counter v4 Built on Symfony
There isn't a whole lot of CRUD in W3Counter (just a few screens to manage an account and websites). The bulk is reporting the web stats, and it doesn't make much sense to consider a visitor log or log row as an object, and to retrieve it as such. Combine that with the high performance demands of the application, and it made more sense to write the reporting queries by hand and profile them individually. W3Counter uses neither Propel nor Doctrine. I created my own model layer, but the rest of Symfony was used as-is. Regards, Dan Grossman http://www.dangrossman.info Frank Stelzer wrote: Really great site with a nice design! Am 22.05.2007 um 15:45 schrieb Jonathan H. Wage: I am curious, did you use Propel? I am interested in this fact, too :) - Frank --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: W3Counter v4 Built on Symfony
Thanks :) I don't believe it is and I don't have a Trac account to add it. Regards, Dan Grossman http://www.dangrossman.info Eriksen Costa wrote: Impressive! Is this site on the list of symfony powered? Congrats! On 21 maio, 21:53, Dan Grossman [EMAIL PROTECTED] wrote: Just felt like sending a note that W3Counter v4 (http://www.w3counter.com) is now online. The latest version of this popular service is built on the Symfony framework (1.0), providing detailed web stats to nearly 5,000 websites. That's over 300 database queries per second, over a billion page views being analyzed, over 28 real-time reports for each site, AJAX, RSS feeds, and lots more running on this framework. All on a single server. Thanks Symfony for making it so painless. Regards, Dan Grossmanhttp://www.dangrossman.info --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] W3Counter v4 Built on Symfony
Just felt like sending a note that W3Counter v4 (http://www.w3counter.com) is now online. The latest version of this popular service is built on the Symfony framework (1.0), providing detailed web stats to nearly 5,000 websites. That's over 300 database queries per second, over a billion page views being analyzed, over 28 real-time reports for each site, AJAX, RSS feeds, and lots more running on this framework. All on a single server. Thanks Symfony for making it so painless. Regards, Dan Grossman http://www.dangrossman.info --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Dynamically appending to page title
Before I go and add a setTitle() call to every action in every controller in my app... Is there a way to get at and append to a view's title (what'll be in title) within the controller? I just want to take all the titles defined in view.yml and append a string to the end of that specific to the person logged in. I can see why this might not be available since the controller doesn't know what view will be rendered until after it's returned (or you return a different view than the default). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---