This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Today's Messages (OFF)  | Unanswered Messages (ON)

Forum: General discussion
 Topic: [parse error] ajax cart tutorial
[parse error] ajax cart tutorial [message #133] Wed, 02 November 2005 22:09
Ian  is currently offline Ian
Messages: 383
Registered: October 2005
Location: Boulder, CO (USA)
Faithful Member
sorry for the multiple posts, but in the tutorial:
$tmp = split (_', $this->getRequestParameter('id', ''));


should be:
$tmp = split ('_', $this->getRequestParameter('id', ''));


Ian

Join us on IRC for LIVE support!
Report bugs here.
 Topic: AJAX Demo CSS Fix/Insert
AJAX Demo CSS Fix/Insert [message #321] Fri, 11 November 2005 18:39
jpipas  is currently offline jpipas
Messages: 3
Registered: November 2005
Location: Michigan
Junior Member
Theres a little bug if you've added alot of things to your cart. The cart items will overflow outside of the div. A quick fix for this is to change the CSS file associated with the cart from this:

div.cart {
  clear:both;
  border:1px solid #B3D4EF;
  background-color:#6699cc;
  padding:8px;
  width:600px;
}


To this:
div.cart {
  clear:both;
  border:1px solid #B3D4EF;
  background-color:#6699cc;
  padding:8px;
  width:600px;
  overflow:auto;
}


This will cause the div to contain everything inside of it, forcing the elements to stay inside the div.

Just thought people might want to know.
 Topic: cache management and speed optimization
icon6.gif  cache management and speed optimization [message #442] Thu, 17 November 2005 11:35
francois  is currently offline francois
Messages: 1636
Registered: October 2005
Faithful Member
If you want to learn more about the symfony cache system, make sure you take a look at the newly added How to speed up a site with the caching system chapter of the symfony book (http://www.symfony-project.com/content/book/page/cache.html).
 Topic: Problems with Xdebug
Problems with Xdebug [message #536] Wed, 23 November 2005 00:29
jgchristopher  is currently offline jgchristopher
Messages: 71
Registered: October 2005
Location: Omaha, NE
Member

Just an FYI.

I spent most of the afternoon trying to figure out why my application stopped working, specifically form process. I finally tracked it down to xdebug being turned on. Not sure what the problem is, if it is a combination of a certain php version and a certain xdebug version.

I was using PHP 5.0.2 on Kubuntu with xdebug 2.0.0 beta 2.

Everything started to work again once I turned off xdebug.

John
 Topic: webcast
webcast [message #540] Wed, 23 November 2005 06:41
azreal  is currently offline azreal
Messages: 35
Registered: November 2005
Member
It would be great if you can do something like on http://www.qcodo.com/demos/ QCODO website so more poeple can actually see the potential of this framework. One example and the book is not enough...
besides that I think that you did great job!! Don't stop Smile


azreal
 Topic: input_phone_tag FormHelper
input_phone_tag FormHelper [message #608] Fri, 25 November 2005 21:08
Ian  is currently offline Ian
Messages: 383
Registered: October 2005
Location: Boulder, CO (USA)
Faithful Member
In case anyone is interested, I made a input_phone_tag FormHelper. It doesn't use i18n, but here's the code:

add to /symfony/helpers/FormHelper.php
function input_phone_tag($name, $value = null, $options = array())
{
	if (isset($options['seperator']))
	{
		$seperator = $options['seperator'];
		unset($options['seperator']);
	}
	else 
	{
		$seperator = " - ";
	}
	
	if (!empty($value))
	{
		//no i18n yet
		$value = preg_replace("[^0-9]", "", $value);
		$area = substr($value, 0, 3);
		$exchange = substr($value, 3, 3);
		$suffix = substr($value, 6, 4);
	}
	
	$area_tag = input_tag($name . "_area", $area, array("size" => ((!empty($area)) ? strlen($area) : 3), "maxlength" => ((!empty($area)) ? strlen($area) : 3)));
	$exchange_tag .= $seperator . input_tag($name . "_exchange", $exchange, array("size" => ((!empty($exchange)) ? strlen($exchange) : 3), "maxlength" => ((!empty($exchange)) ? strlen($exchange) : 3)));
	$suffix_tag .= $seperator . input_tag($name . "_suffix", $suffix, array("size" => ((!empty($suffix)) ? strlen($suffix) : 4), "maxlength" => ((!empty($suffix)) ? strlen($suffix) : 4)));
	
	//no i18n yet
	return $area_tag . $exchange_tag . $suffix_tag;	
}  


If someone's interested, I think it wouldn't be that hard to adjust the function to handle i18n. Here are some links:

http://www.csoft.co.uk/phone_numbers/
http://smarty.incutio.com/?page=PhoneFormatPlugin
http://en.wikipedia.org/wiki/List_of_country_calling_codes

[Updated on: Fri, 25 November 2005 21:15]


Ian

Join us on IRC for LIVE support!
Report bugs here.
 Topic: PostgreSQL and propel generator
PostgreSQL and propel generator [message #811] Mon, 05 December 2005 04:16
leonard  is currently offline leonard
Messages: 4
Registered: October 2005
Junior Member
Hi,

I tried to reverse-engineer a PostgreSQL database using propel-generator that comes with symfony-beta. It seems that the bundled propel does not support PostgreSQL sequences.

So I tried to download propel-1.1.1 from its website and put it under symfony and it works, although there's this error:

[propel-creole-transform] There was an error building XML from metadata: Cannot fopen /tmp/TestProject/config/schema.xml failed to open stream: No such file or directory

Is this due to what I did by updating propel? It seems that /tmp/TestProject has been defined previously in propel.ini before I updated propel. So I hope it's not because of that.
 Topic: question about components/slots
question about components/slots [message #1011] Sun, 11 December 2005 22:23
azreal  is currently offline azreal
Messages: 35
Registered: November 2005
Member
Is there something in symfony which works like components in Ruby/Rails?

I know that there are slots but the problem with slots is that you can use them only in the main layout.
What I need is to use something like slots (so I need to call different model/action and get the view as a result) inside of my view (not main layout)..


azreal
 Topic: Validate form loaded through link_to_remote()
Validate form loaded through link_to_remote() [message #1012] Sun, 11 December 2005 22:29
martin_h  is currently offline martin_h
Messages: 273
Registered: December 2005
Location: Sweden
Faithful Member
Hi!
I'm trying to load an add form into a page via link_to_remote()
The form is a result of an action (add) and uses include_partial() to be able to use the same form also for the edit action.

It seems to work fine.

But as I want to add validation, I have created an add.yml file but here starts the problem.

I don't want to validate my form until it is submitted, but Symfony uses the post-method to load the form somehow (I think) so it is already validated (and failed) at loading.

Is there any way around this or am I doing something wrong.
I'm a newbie to Symfony...

Thanks in advance
 Topic: Switch layout dynamically
Switch layout dynamically [message #1175] Fri, 16 December 2005 15:42
allegro  is currently offline allegro
Messages: 2
Registered: November 2005
Junior Member
Hallo,

ist it possible to change the rendered layout file dynamically, for instance, when a specific parameter was given?

I've got an application where clients may login and some of them require an other layout than the default one, but they all use (mostly) the same functionalities and differ only in design. So it would be comfortable to have the possibilty to switch just the layout- and templatefiles.

Thanks
 Topic: build-model producing duplicate declarations
build-model producing duplicate declarations [message #1257] Tue, 20 December 2005 16:42
andrew
Messages: 39
Registered: December 2005
Member
For some reason build-model has started producing duplicate declarations (ie two of the same get() and select() statements) for one oh my table's foreign keys. I've checked the schema, everything seems fine there. Its easy enough to edit out these duplicate enteries, but what whould possible cause it to do this?
 Topic: Using a different sfView class?
Using a different sfView class? [message #1339] Sat, 24 December 2005 00:17
mthorn  is currently offline mthorn
Messages: 1
Registered: December 2005
Junior Member
I'd like to use a different view than the sfPHPView. I searched the code and the documentation and haven't found an easy way. A couple of issues make this difficult:

1. The view class to use is partialy defined in module.yml as sfPHP.
2. module.yml isn't parsed in the project/config directory.
3. You have to put module.yml in each module/config directory to redefine the view, even if all modules use the same view.
4. Unexpectedly the myView class is ignored.

I think module.yml should be able to be put in the project/config directory just like all the other configs. This would at least make changing the view class for all modules easier.

A better solution would be to make a more robust view manager that understands the file extension of the template. If the extension is ".php" use sfPhpView, ".html" then sfHtmlView, ".ax.html" the sfAxHtmlView, etc.

Another possible solution is to give the view manager an order of extension preference to decide on what view to use.

I know a lot of people are against templates but philosophy aside I have a requirement to use them. I made a view that will first check for a template with an ".ax.html" extension and if found run an XSLT stylesheet to convert the html into PHP and then pass it to the sfPHPView as normal. If no ".ax.html" is found it defaults to the ".php".

Those interested in the template system can read some quick docs at http://www.mthorn.net/ax/. It is loosely based on Kid for Python.
 Topic: Dealing with object models stored outside a regular RDBMS
Dealing with object models stored outside a regular RDBMS [message #1562] Thu, 05 January 2006 16:57
flod  is currently offline flod
Messages: 20
Registered: January 2006
Junior Member
Hi guys,

This is my 1st post so first of all I'd like to thank the Symfony developers for bringing us such a great platform.

I've been playing for a while with it, but now, that I've actually decided on using it for a real project, I came across a problem on which I'd like to hear your opinions.

I have to build an application which is using as data storage a DBXML database, who's interface is published through XMLRPC. For this reason I can't (at least entirely) rely on the Propel/Creole integration for building my models, but need to find a solution for keeping the 'M' in the Symfony's MVC pattern Wink

As far as I could understand from how the framework works, my 2 options would be to write from scratch the models classes with all the properties and business logic involved and basically keep only the symfony recommended fs structure (i.e. storring them in the /lib/models folder), or build the XML schema corresponding to my models and use the build-model tool, but then reimplement all the involved, auto-generated, methods from the BaseModelName class in the ModelName class (or at least the methods dealing with fetching and storring the data).

Does anyone have a better idea about dealing with this issue while making use of the most that the framework has to offer (and speeding things up)? Both of my solutions seem to take quite a lot of effort to implement ... Razz

Thanks in advance,
Florin.
 Topic: Markdown trouble
Markdown trouble [message #1684] Tue, 10 January 2006 23:58
mwolff  is currently offline mwolff
Messages: 3
Registered: January 2006
Location: Hamburg, Germany
Junior Member
Hey there,

I am working my way through the Askeet tutorial and have arrived at day 9, where the Markdown library comes into play. Unfortunately it seems Markdown has some problems with the test data in combination with the regex engine:
$ php batch/load_data.php
PHP Warning:  preg_replace_callback(): Unknown modifier '|' in /srv/www/askeet/lib/markdown.php on line 1473

Warning: preg_replace_callback(): Unknown modifier '|' in /srv/www/askeet/lib/markdown.php on line 1473
PHP Warning:  preg_replace_callback(): Unknown modifier '|' in /srv/www/askeet/lib/markdown.php on line 1473

Warning: preg_replace_callback(): Unknown modifier '|' in /srv/www/askeet/lib/markdown.php on line 1473
PHP Warning:  preg_replace_callback(): Unknown modifier '|' in /srv/www/askeet/lib/markdown.php on line 1473

Warning: preg_replace_callback(): Unknown modifier '|' in /srv/www/askeet/lib/markdown.php on line 1473


My configuration: Gentoo, PHP 5.1.1
PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 6.2 01-Aug-2005

What can I do?

CU
Markus
 Topic: count(*) using criteria and pager
count(*) using criteria and pager [message #1689] Wed, 11 January 2006 06:07
archi  is currently offline archi
Messages: 26
Registered: December 2005
Junior Member
Is it possible to use count(*) with group by when joining 2 tables in propel using Criteria?
I can make this simple sql query & hydrate but i want to use sfpager with results from query.

I was trying to do:

$pager = new sfPager('Category', APP_PAGER_MAX);

$c = new Criteria();
$c->addSelectColumn('count(*) AS counter');
$c->addJoin(CategoryPeer::ID, SubcategoryPeer::ID_CATEGORY, Criteria::LEFT_JOIN);
$c->addGroupByColumn(CategoryPeer::NAME);

$pager->setCriteria($c);
$pager->setPage($this->getRequestParameter('page', 1));
$pager->init();

but this generate errors
 Topic: No routing no caching
No routing no caching [message #1735] Thu, 12 January 2006 20:54
dejan_spasic  is currently offline dejan_spasic
Messages: 13
Registered: January 2006
Location: Germany/Düsseldorf
Junior Member
If i disable the routing in prod section i get following Exception
Quote:

Fatal error: Uncaught exception 'sfConfigurationException' with message 'You must activate routing to use cache system' in C:\xampp\php\pear\symfony\symfony\view\sfViewCacheManager.cl ass.php:45 Stack trace: #0 C:\xampp\php\pear\symfony\symfony\core\sfContext.class.php(7 9): sfViewCacheManager->initialize(Object(sfContext)) #1 C:\xampp\php\pear\symfony\symfony\core\sfContext.class.php(9 7): sfContext->initialize() #2 C:\Dokumente und Einstellungen\Development\www\web\index.php(10): sfContext::getInstance() #3 {main} thrown in C:\xampp\php\pear\symfony\symfony\view\sfViewCacheManager.cl ass.php on line 45

settings
Quote:

.settings:
no_script_name: off
routing: off
url_format: GET
I must explicit disable the chache
Quote:

prod:
.settings:
no_script_name: off
routing: off
url_format: GET
cache: off
after that it works fine. is this normal?

[Updated on: Thu, 12 January 2006 20:55]

 Topic: Custom View Class
Custom View Class [message #1770] Sat, 14 January 2006 02:09
myke  is currently offline myke
Messages: 1
Registered: January 2006
Junior Member
So in the factories.yml you can define custom classes to override the symfony ones.
I have multiple clients accessing my site and I want to be able to have custom template files for each client.

I would like to just create a directory in the template directory that contains the clientid and if a file with the correct name exists there, the sfMyView class should use that instead of template/

It doesn't look like factories.yml works with the view class so how could this be done?
 Topic: Class stubs and mocks
Class stubs and mocks [message #1799] Mon, 16 January 2006 00:46
jakuza  is currently offline jakuza
Messages: 54
Registered: December 2005
Member
Hello everybody,
I'm curious about how everyone has come out of the autoloading problem when testing with stubs or mocks. Share your experience!
Ciao!
 Topic: FromHelper input_date_tag
FromHelper input_date_tag [message #1852] Wed, 18 January 2006 13:02
dejan_spasic  is currently offline dejan_spasic
Messages: 13
Registered: January 2006
Location: Germany/Düsseldorf
Junior Member
If the date format ist not like pattern Y-m-d strtotime in line 379 will always return -1.

Is has to be like this.
list($d, $m, $y) = sfI18N::getDateForCulture($date, $culture);
$date = strtotime("{$y}-{$m}-{$d}");
 Topic: Doc reference prototype.js use by symfony
Doc reference prototype.js use by symfony [message #1861] Wed, 18 January 2006 15:20
crakoto
Messages: 19
Registered: January 2006
Junior Member
Developer Notes for prototype.js
covers version 1.4.0

by Sergio Pereira

http://www.sergiopereira.com/articles/prototype.js.html#Refe rence
 Topic: Symfony no longer autoloads custom helpers
Symfony no longer autoloads custom helpers [message #2028] Mon, 23 January 2006 20:30
Ian  is currently offline Ian
Messages: 383
Registered: October 2005
Location: Boulder, CO (USA)
Faithful Member
If you specify a custom helper as a standard_helper, Symfony will no longer autoload it if a function from this helper is called in a template. Now, I am forced to use_helper() to load the helper again in the template before calling the function.

Ticket 145 created on this issue


Ian

Join us on IRC for LIVE support!
Report bugs here.
 Topic: Propel errors
Propel errors [message #2044] Tue, 24 January 2006 05:14
mabs29  is currently offline mabs29
Messages: 5
Registered: January 2006
Junior Member
The Propel upgrade has caused a few errors with schemas made for symfony 0.5.284. As part of your upgrade to 0.6, you may see these errors from symfony build-model:

  • build.properties not found. Solution: cp config/propel.ini config/build.properties
  • autoincrement="true" is an invalid attribute. Solution: change to autoIncrement="true"
  • isI18N and other symfony attributes are invalid. Solution: add noxsd="true" to <database>
 Topic: Design of layouts/templates with view.yml
Design of layouts/templates with view.yml [message #2117] Wed, 25 January 2006 17:59
jerfaas  is currently offline jerfaas
Messages: 2
Registered: January 2006
Location: Berchem - Antwerp
Junior Member
Hi,

I am designing a website with 2 layouts/templates
-The default layout will use things like slots and is rather complex
-The popup layout is used for editing data (like the default editSucces) in a popupwindow

So in each module both layouts are used...
Because there are only 2 layouts in the application (and many modules) it should be nice if it is possible to define the 2 layouts in the application view.yml. So that in the modules view.yml we only have to define for which actions the popup
layout/template should be used.

Is this possible in the symfony design (or in version 0.6) ?

With kind regards,

Jerfaas de Jong





The only solution I now see is to set for each module I have:
popeditSuccess:
layout: popuplayout
stylesheets: [main, popup]
javascripts: []

all:
layout: layout
stylesheets: [main, layout, Menu, MenuIcons, subModal]
javascripts: [global, xmlhttp.class.js, hierarchy.class.js, subModal]
slots:
sidebar: [sidebar, default]




Is it possible to set this information in
application view.yml
layout:
stylesheets: [main, layout, Menu, MenuIcons, subModal]
javascripts: [global, xmlhttp.class.js, hierarchy.class.js, subModal]
slots:
sidebar: [sidebar, default]

popuplayout:
stylesheets: [main, popup]

all:
layout: layout

http_metas:
content-type: text/html; charset=utf-8

metas:
title: My project
robots: index,

follow
..



and for each module view.yml only
popeditSuccess:
layout: popuplayout
 Topic: sfEzpdo configuration bug
sfEzpdo configuration bug [message #2155] Thu, 26 January 2006 09:36
mabs29  is currently offline mabs29
Messages: 5
Registered: January 2006
Junior Member
If you are experiencing problems with configuring sfEzpdo, please look at ticket 161. There is a clash between the symfony defaults and ezpdo.ini. The temporary solution is to put all the ezpdo.ini options you want in databases.yml.

This problem is a bug because it clouds the databases.yml with extra options which should be global to your project.

Tip: Put the following piece of code in a template to see your current options:
$m = epManager::instance();
var_dump($m->getConfig());
 Topic: Tidy not being enabled
Tidy not being enabled [message #2222] Sun, 29 January 2006 00:57
slide  is currently offline slide
Messages: 33
Registered: January 2006
Location: Baton Rouge, Louisiana
Member
So I would like to have tidy enabled on my frontend_dev.php so, I went to frontend/config/settings.yml and added

all:
   .settings:
    tidy:                   on


but alas when i go and refresh frontend_dev.php its still of! I have tidy installed so i don't know whats wrong Sad
 Topic: Ajax: multiple remote action
Ajax: multiple remote action [message #2285] Tue, 31 January 2006 18:00
noel  is currently offline noel
Messages: 62
Registered: January 2006
Location: france, 94
Member
I'd like to do somethings like the shopping card demo, but when we put the product into the shopping card, I'd like this product disappears from the list.

How to do that ?

thanks.
 Topic: Problems with generate-propelcrud
Problems with generate-propelcrud [message #2359] Thu, 02 February 2006 16:07
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Dear all

Having successfully got a schema.xml built, and then corrected it to repair problems with my database normalisation, I finally got my model classes created, so I feel like I'm making some progress Rolling Eyes. However, now that I have got around to scaffolding, the command I am using doesn't seem to do anything. I execute the following:

symfony generate-propelcrud core adminuser AdminUser


- where core is the name of my test app, adminuser is the name of the module to create, and AdminUser is one of the previously generated model classes. My understanding in that this should build me a new module in project/apps/core/modules/adminuser/ - have I got this right?

Anyway, when I exec the command above, it does nothing. I notice that if I get the model class name wrong (ie if it doesn't exist) then symfony will raise an error. Having read a post on this topic elsewhere on the forum, I believe that the command should print out the names of files it generates - and there aren't any!

MTIA,

Jon

[Updated on: Thu, 02 February 2006 16:08]


Remember Palestine
 Topic: view configuration
view configuration [message #2418] Mon, 06 February 2006 15:41
runmen  is currently offline runmen
Messages: 7
Registered: February 2006
Junior Member
I have two actions, 'index' & 'tag'
Both share same template 'indexSuccess.php', so for 'tag' action I use $this->setTemplate('index');

but if in view.yml, I sets configuration only for 'indexSuccess', and go to 'tag' action, configuration not loaded, so now I dublicate configuration.

It's seems like view confuration is action based, but it's starange that i use 'Success' postfix. And looks like template based.

may be better, use
action:
- for action based config, e.g. set title
actionSuccess:
- for template based config, e.g. set meta info
 Topic: component as action?
icon3.gif  component as action? [message #2426] Mon, 06 February 2006 19:14
dleute  is currently offline dleute
Messages: 52
Registered: February 2006
Location: VT
Member

I just read about components and upgraded to the alpha. One of the problems I have with symfony so far is speed of dynamic requests. Here's my idea:

Would it be possible to setup routing so that there is an action type parameter?

article_view:
url: /article/view
param: { module: article, action: view, actionType:component }

This bypasses the need for an action at all for some requests. If components are that much faster, why not provide the ability to bypass actions altogether for pages that don't need them, speeding up the framework immensely? (one would hope). Such a feature would allow a large chunk of code to be bypassed on simple requests.

/article/view could call the article/view component. do components still have the ability to access request parameters? so /article/view/1 could still use that as the primary key to get the value from the database?

--Derrek
 Topic: full page cache files in specific location
icon5.gif  full page cache files in specific location [message #2427] Mon, 06 February 2006 19:23
dleute  is currently offline dleute
Messages: 52
Registered: February 2006
Location: VT
Member


My application needs to be able to cache the full results of page requests based on parameters of the action that generates it to a specific location. I am doing this to provide static version of the page that apache can access directly without involving php.

I am new to symfony and don't see an easy way to do this. I'd write a plugin myself based on code I've used to do this elsehwere but I don't know how to begin.

Basically, I want to intercept the cache save method for page caches and save them in a particular location based on request parameters. Ideally, those parameters would be set from within an action. I imagine this could be done with the new modify on the fly settings capabilites of the alpha.

any suggestions how to go about this? is it already there and I just don't know how to do it?

--Derrek
 Topic: i18n/DateFormat.php trouble
i18n/DateFormat.php trouble [message #2439] Tue, 07 February 2006 10:05
kyoichi  is currently offline kyoichi
Messages: 1
Registered: February 2006
Location: Japan
Junior Member
i am using symfony 0.5.284

i did a symfony generate-propelcrud with a
table including a

type="date" required="false"

field, then enabled i18n by setting a filter that
does

$this->getContext()->getUser()->setCulture('ja');

then i edit editSuccess.php to use

<?php echo object_input_date_tag($news, 'getStart', array('rich' => true)) ?>

then i view the page for "create" and the template
shows a default date of "70/01/01" which really should
be a blank field since it's a required="false" field.

i looked into the symfony source code and i think

i18n/DateFormat.php
public function format($time, $pattern='F', $charset='UTF-8')

should consider the fact that $time might be null, and
in that case, return null. or maybe i'm guessing wrong.

but the default value of the field being a result of

getdate(null)

seems wrong.
 Topic: i18n tables with admin
i18n tables with admin [message #2627] Sat, 11 February 2006 22:45
gravity  is currently offline gravity
Messages: 12
Registered: February 2006
Location: Aachen Germany
Junior Member
I am using _i18n table support of the sf OM model builder.
Seems to work perfectly.

Now I want to generate the backend.
The generator works, but ignores the _i18n fields.

I read in the forum that the admin in sf 0.6 will support i18n.
Is this the case?
Are there some special configurations to be done to tell the admin generator of the _i18n tables?
Is the admin generator building the interface from the schema.xml or from the object model?


Chris

[Updated on: Sun, 12 February 2006 16:07]

 Topic: Autoloading in Symfony 0.6
Autoloading in Symfony 0.6 [message #2709] Tue, 14 February 2006 14:12
nightfreak  is currently offline nightfreak
Messages: 36
Registered: November 2005
Member

i was wondering about folowing line of the release log
* [fabien] autoloading is now more configurable at runtime
Please tell me whats new?
 Topic: getInstance()->getUser() phpdoc return type wrong?
getInstance()->getUser() phpdoc return type wrong? [message #2792] Thu, 16 February 2006 09:20
awbacker  is currently offline awbacker
Messages: 42
Registered: December 2005
Location: San Francisco
Member

In the askeet demo I noticed that this kind of line is called :
$this->getContext()->getUser()->signInAs($user);

Specifically sfContext::getInstance()->getUser() is used, but I think it ends up the same.

Should the docs in this case be changed to define the return type as myUser so that the methods added to this class get returned? Or is this not possible since all the 'apps' define their own 'myUser' class?

- Andrew
 Topic: [resolved] generate-crud
[resolved] generate-crud [message #2793] Thu, 16 February 2006 11:32
n.godet  is currently offline n.godet
Messages: 2
Registered: February 2006
Junior Member
the problem was in fact the routing config file... sorry


Hi everybody,

i'm new to symfony and first of all congratulations to you guys, you've done a great work, that's the framework the php community was waiting for!

i'm trying to generate a crud (with 0.6):
$ symfony propel-generate-crud fo account Account

the files get created in \apps\fo\modules\account, but when i access http://localhost/fo_dev.php/account/, i've got a 404 Error page.

what shall i do to correct that, is it a routing problem?

Thanks

[Updated on: Thu, 16 February 2006 11:44]

 Topic: I18N question
I18N question [message #2820] Thu, 16 February 2006 20:04
revenazb  is currently offline revenazb
Messages: 14
Registered: December 2005
Junior Member
Hi All,

I read the sumfony book on i18N and I have a question. How would you handle a table with the following fields

table main:
id
category_id
region_id

Where category_id and region_id refer to a tables that have the follwing fields.

table region and category:
id
name

Now the name must be internationalized in both the tables. Furthermore the main table also has a name for each id that must be internationalized.

My problem is that if I internationalize the category and region tables I end up with a table that only has id in it.

Bert
 Topic: subdomains as account keys
subdomains as account keys [message #2847] Fri, 17 February 2006 09:26
smallbeer  is currently offline smallbeer
Messages: 282
Registered: November 2005
Faithful Member
Let me start by saying I'm still learning symfony.

I have a project where the site has multiple users. I'd like to use subdomains as account keys - username.domain.com for example.

Should I be looking at how the filters worked in the askeet tutorial? anything else I should be watching out for?

TIA
 Topic: helpers in action, view.yml?
helpers in action, view.yml? [message #2852] Fri, 17 February 2006 10:48
archi  is currently offline archi
Messages: 26
Registered: December 2005
Junior Member
By default I can set helpers in app/config/settings.yml. Is it possible to set helpers in action, module/config/view.yml? I want to ged rid of use_helpers() from templates.
 Topic: [resolved] How to enable propel debug output?
[resolved] How to enable propel debug output? [message #2875] Fri, 17 February 2006 19:16
tamcy  is currently offline tamcy
Messages: 222
Registered: February 2006
Location: Hong Kong
Faithful Member
What I want is to have the sql statement printed out for debugging . Where and how can I do this? Thank you!

(Edit: oh I forgot the debug window!)

[Updated on: Fri, 17 February 2006 19:48]

 Topic: symfony propel-* show just errors/warnings?
symfony propel-* show just errors/warnings? [message #2916] Mon, 20 February 2006 05:26
redCashion  is currently offline redCashion
Messages: 56
Registered: February 2006
Member
Is there a way to turn off the display for commands such as symfony propel-build-model so that it only showed errors and/or warnings?
Pages (73): [1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  >  »]

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software