Hi,
I'm trying to let users type in date and time values into an input field. Some examples may include:
Tomorrow at 3pm
Now
Today at 1pm
Next tuesday 4pm
How would I go about parsing such readable text into date/time strings?
E.g. dd/mm/yyyy hh:mm
Can it be done client-side using jquery or must it be done ajax through php?
Thank...
Hello,
Just wanted to know how do i add static html pages to WordPress? For example, let say i have page products.html, how would i add it to wordpress (any menu, etc) and once added, how do i visit them because wordpress had a typical url structure.
Thanks.
...
I'm creating a simple caching library in PHP. Currently, when I store a value I create 2 files: One that contains the value and another one to store the creation time. I want a robust solution and I'm not sure how safe it is to use the file date attributes. Do you think is safe to use the file date attribute for expiry time, instead to s...
hey there,
I'm having a hard time getting my AJAX requests to work on a staging server. It all worked fine on my development machine, but as soon as I uploaded it, all my AJAX requests stopped working. I found out that, if I change the relative urls (eg. "index.php") to absolute urls ("http://mydomain.com/index.php") the requests work a...
I am working on an auction web application. Now i have a table with bids, and from this table i want to select the last 10 bids per auction.
Now I know I can get the last bid by using something like:
SELECT bids.id FROM bids WHERE * GROUP BY bids.id ORDER BY bids.created
Now I have read that setting an amount for the GROUP BY results ...
I use Kohana for my project, but when i located my project to hosting, environment test watch write it: The filter extension is either not loaded or not compiled in.
I don`t understand... what is the problem?
Sorry, for my language.
...
Hi,
I am trying to get a working regular expression to convert standard HTML code to a custom format (needed for data export).
For exemple within the following code :
<a href="toto.php">Toto
</a> bwahaha
<td width="49%" bgcolor="#FF9E39" style="padding-left: 10px; padding-top: 3px; padding-bottom: 3px; border-bottom: 5px solid rgb(255...
How could I prevent mentioned plugin's login form from using default layout? I am aware of this question, but that answer doesnt work for me. For starters, there's no signin module in modules dir, probably plugins handle it in different way, I dont know. Just learning symfony. Thanks in advance :)
...
Hello,
I have a switch case like this
switch($filesize_in_bytes){
case "10Mb <= $filesize_in_bytes <= 100Mb":
//do some stuff and break;
case "1Gb <= $filesize_in_bytes <= 10Gb":
//do some stuff and break;
}
As you can see $filesize_in_bytes is in bytes, now how can I convert those values with Mbs and Gbs int...
I would like to display a catergory page as my homepage rather than a CMS page as it seems to be difficult to get a CMS page to properly display items.
I have gone to
Url rewrite Management
and created a url-rewrite for a category
Then gone to
System|Configuration|Web|Default Pages|
and changed
Default Web URL
to...
I have used the sample code given in this site?
but it not works means that when I used myOpenID and localhost for attribute exchange then it gives an array like this
Auth_OpenID_AX_FetchResponse Object ( [mode] => fetch_response [ns_alias] => ax [ns_uri] => http://openid.net/srv/ax/1.0 [data] => Array ( ) [update_url] => )
Can anyone...
Ok so Ive got this Javascript file, simply:
$(document).ready(function() {
$('.status').prepend("<div class='score_this'>(<a href='#'>score this item</a>)</div>");
$('.score_this').click(function(){
$(this).slideUp();
return false;
});
$('.score a').click(function() {
$(this).parent().parent().pa...
I'm working with a mysql group_concat function and I'm having some problems. I've just noticed that the array value really isn't a value but rather a part of my result which is not correct. I need to make the string the value so that I can reference it.
Here is the portion of the SQL that I have:
GROUP_CONCAT(t3.location, t2.content...
I have set the form decorators in this way:
<?php
$this->setElementDecorators(array(
'Label',
array(array('labelTd' => 'HtmlTag'), array('tag' => 'td', 'class' => 'name')),
array(array('elemTdOpen' => 'HtmlTag'), array('tag' => 'td', 'class' => 'form','openOnly' => true, 'placement' => '...
I have a form, very basic, and when I hit enter key nothing happens in firefox, but in google chrome it submits. Haven't tried other browsers yet...
Nothing happens at all when hitting enter in firefox.
When clicking the submit button it works fine in both browsers.
The form is inside a DIV, and the form has javascript too, here is th...
Hi,
I have an Indian company data set and need to extract the City and Zip from the address field:
Address Field Example:
Gowripuram West, Sengunthapuram Post, Near L.G.B., Karur, Tamilnadu, Karur - 639 002, India
As you can see the City is Karur and the zip is followed after the - (hyphen).
I need the PHP code to match [city] - [z...
I have a staging and development environment on the same machine. I would like to configure a different memcached port in ProjectConfiguration.class.php depending on my environment. I imagine its not safe to use $SERVER['HTTP_HOST'] inside of the ProjectConfiguration file because that won't account for tasks run from the command line.
W...
Hello
First, I'm not looking a way to parse an RSS-feed. I am creating an rss-feed myself, but now I've got a problem.
I'm putting some text to description (obvisiously), but it gives me errors of some unallowed chars (for example "&"). Is there a way to remove all these chars or should I parse every char manually?
Also, in my feed fi...
I have a wordpress theme that I like to duplicate. To make things easier on myself I'm trying to use the bloginfo function to call my jquery file..like this:
<script type="text/javascript" src="<?php echo bloginfo("template_url"); ?>/js/jquery-1.4.2.min.js"></script>
I just can't get it to work. When I check my source file it looks ...
To make this more clear, I'm going to put code samples:
$file = fopen('filename.ext', 'rb');
// Assume $pos has been declared
// method 1
fseek($file, $pos);
$parsed = fread($file, 2);
// method 2
while (!feof($file)) {
$data = fread($file, 1000000);
}
$data = bin2hex($data);
$parsed = substr($data, $pos, 2);
$fclose($file);
T...