ignace
Moderators-
Posts
6,457 -
Joined
-
Last visited
-
Days Won
26
Everything posted by ignace
-
How to let users control order records display??
ignace replied to jreed2132's topic in PHP Coding Help
Just don't forget about Graceful Degradation so that people that have JS disabled (home or corporate) can fall-back to the up/down-system. -
If you have Firefox, install Firebug you'll notice that upon loading the JS file it modifies your HTML and adds the libraries so you can use their namespace (fb). Among those you will find they load a XSLT template file to translate <fb:login/> to their famous login screen. You can alter the DOM using native JS or by using a library like jQuery. Seriously though if you want to replicate what they did, it's best you buy yourself a book on everything X(HTML, ML, SLT, ..)
-
I assume this is not so common that you would make it a method of the parent module class? So, how about plugins? A module on a web page and a module in the system are two different things. You could also load the module data from a view helper that loads the required data from a model. I would create a view helper that takes in an argument regarding it's location, that calls a model to load the required modules based on the security group policy currently applied to the user eg $this->loadSectionModule('sectionRightSidebar'); Always try to keep all components as loose coupled as possible. If it only supplies a part of the data you work on then you most likely don't need it and it would be best to define a mechanism that passes the information through to the class. The answer should be obvious. Your view by default returns HTML for a HTTP request, extend this so that for XMLHttpRequest's it returns XML or JSON. In normal circumstances you should only worry about the M as the C is part of your application layer and in most cases already part of some framework as is the V which focuses on the presentation layer and comes with the framework. Make sure all classes rely on classes within their layer and not on classes from other layer's. You should use Behavioral patterns whenever your class from a layer relies on the behavior of a class in another layer for maximum flexibility.
-
You need to use XSLT to replace the tag <ha:login/> with your login-form, somewhat like: <xsl:template match="login"> <form action="#" method="POST"> .. </form> </xsl:template>
-
You don't need the USB cable, a regular network cable will do fine (one with a RJ45).
-
Something like? preg_match('#(https?(//)|(\\\\))+[\w\d:#@%/;$()~_?\+-=\\\.&]*)#', $text);
-
How to let users control order records display??
ignace replied to jreed2132's topic in PHP Coding Help
Are these changes visible for all users? Or only for the current user? -
You would use Ajax. [tt]<input type="text" value="" onchange="lookup(this)"> <ul id="lookupResult"></ul> function lookup(input) { jQuery.getJSON('http://domain/path?query=' + input.value, function(data) { var lookupResult = document.getElementById('lookupResult'); lookupResult.addElement(..); .. }); }
-
What is it that you exactly want to do?
-
Indeed. To be honest I have never used the @-operator anywhere on any live site.
-
How to access external web services from in php ?
ignace replied to djbuddhi's topic in PHP Coding Help
Post an example XML file and what you want to get from it. -
It's bad practice. Error's are there for a reason.
-
Where do you store your cart contents in session? db? or both? You must realize that very little people actually press the logout button. So if you base your logic on this event then in most cases you won't be clearing at all.
-
post your code
-
How to access external web services from in php ?
ignace replied to djbuddhi's topic in PHP Coding Help
libxml_use_internal_errors(true); $dom = new DomDocument(); if ($dom->load('http://domain/path')) { //.. } -
@syed Stop posting code which uses the @-operator you hide useful error messages for the OP which they can hide themselves using display_errors = 'Off'. You don't need the @-operator.
-
Yeah, I figured that out after I could still edit my reply. I didn't bother to create another reply as I was sure someone else would correct me, and they did. Thanks Mchl
-
Sure it does, you just applied it wrong as it's: onclick="return btnSearch();" You started big-mouthing me If I misinterpreted it, then I excuse myself.
-
Because it hides error's the OP would wish to see/handle himself. The @-operator suppresses these and the OP will have a hard time figuring out why it doesn't work.
-
How to access external web services from in php ?
ignace replied to djbuddhi's topic in PHP Coding Help
What is the format they use for communication? XML, JSON, .. or a standard like SOAP? -
If you bothered to learn JS you wouldn't have to come here asking questions to make a fool of yourself. It's function btnSearch(){ if(a.value!='' || a.value!='enter search terms here'){ //Submit if not blank or no enter search terms here search.submit(); return true; }else{ $('#txtSearch').fadeIn('slow'); var t=setTimeout("chkSearch('txtSearch', 'enter search terms here')",5000); return false; } }
-
groups (id, name) users (id, group_id, username, password) users_lists (admin_id, user_id) Your going about it the wrong way. You don't need the extra admins table. You would check if a user is an admin (part-of group) in your application and load a user list for these users.
-
@syed Remove the @-operator
-
How to access external web services from in php ?
ignace replied to djbuddhi's topic in PHP Coding Help
In what format does the external web service come? -
You need to return either false or true from btnSearch(), false if you want to halt the submit of the form and true if want it to proceed. In btnSearch you would disable the button prior to returning the true statement.