You are here: Re: [SMARTY] newbie « Smarty Templates Posts « IT news, forums, messages
Re: [SMARTY] newbie

Posted by Jochem Maas on 09/26/22 11:22

Patrick Roane wrote:
> My bad ...more clarification should have been given.
> As for answering the 'newbie' question:
>
> 1. smarty- just the basics
> 2. php & php5- I understand the basics and have a
> decent understanding of the language
> 3. asking questions- If I get a response ...should I
> reply to the whole group or just the individual?

never reply to the individual unless your specifically asked to,
its a personal friend or you have a _very_ good reason for going
private. generally it not the done thing.

some people reply just to the list, others always do a reply-all,
its a matter of taste - it also varies from list to list. personally
I'm a repl-all kind-a-guy.

oh yeah top-posting is also often frowned upon, then again
some people prefer it. me I don't give a ***t :-)
although when reading comments/replies its sometimes easier to
grasp the context when the comments/replies are inline.
(but its a matter of taste!)

>
> The book I'm using is Beginning PHP 5 and MySQL
> E-Commerce by Cristian Darie/Mihai Bucica.

don't know that one personally.

>
> The smarty versions in book/and the one I'm using are
> the same.
>
> As for the error message- I'm not sure what it means
> exactly. The only connection I can make is that it has
> something to do w/the 'admin_categories.tpl' and a
> MySQL result set?

specifically there is a 'resultset' object (its a userland
object - it maybe something from PEAR, but I can't tell) that
seems to be assigned to the template and then its being used in
the template as if it were an array.

>
> Everything had been working pretty well up to the
> point where I have to design the 'catalog
> administration' section of the site (where the client
> can login and edit his
> products/descriptions/departments etc.) The site is
> for a custom furniture store. Anyway, one response I
> got for this list suggested that:
>
> "...the template is trying to iterate an object like
> it was an
> array,

thats exactly what is happening. so either the template
or the driving script needs to change.

probably due to wrong passing of variables to
> the template."
>
> I combed through my code and I didn't find any
> variable discrepancies (but mabey I missed something).

the name(s) of your variables are fine.... its just that
at given point in the 'compiled' Smarty template the php code
(Smarty 'compiles' the template into runnable php code btw!)
trys to perform a foreach loop or use array syntax (e.g.
$bar['foo']) on a variable (which you assigned) which is not
an array but an object.

still stuck? post line 49 of the followinf file to the list:
c:\customfurniture\templates_c\%%F9^F97^F97AE06E%%admin_categories.tpl.php


>
> Thanks for your help.

:-)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация