I am a bit lost here, solution could be lurking under my nose but I couldn't get, thought of you guys if any one can help.
Here is the problem:
I have Zend Framework standard file layout:
Project
-application
-controllers
-views
-layouts
-scripts
-layouts.phtml
-library
-public
-images
...
Is it possible to do cross database joins in drupal?
Say you have two databases, drupal and old_data_source. You want to join drupal.node to old_data_source.page.
db_set_active() can be called to use multiple databases. However can't find anything about cross database table joins!
(I'm looking into this as part of a migration script a...
hi every one i have an xml file and want to update my code is following
<gallerylist>
<record>
<movie>videos/15Avatar_HD.flv</movie>
<title>Avatar1</title>
<desc>It plays any kind of video file that Flash Player supports</desc>
<preview>videos/previews/6avatar.jpg</preview>
<imgplaylist>videos/imgplaylist/14p1.jpg<...
Hi there folks !
I'm a PHP programmer from Bulgaria. I have a visual impairment called Keratoconus which worsens my vision with time, and although it's not very probable that it's going to develop much further I'm a bit worried about my programming career. Especially dealing with the front end work technologies like HTML/CSS/AJAX coding...
It seems to me that web developers of different programming languages often share different opinions on this. For example, Ruby web developers (with Rails being the dominant framework) appear to think of controllers as glue code, which should have functional tests, but not unit tests. A similar attitude dominates in the PHP world, yet th...
PHP's "or" is an interesting keyword. In fact it's so interesting that sometimes I just don't get it. Here's a code snippet that makes me confused:
echo 0 or 1; // prints 1
$foo = (0 or 1);
echo $foo; // prints 1
$foo = 0 or 1;
echo $foo; // prints 0 (for some reason)
Wouldn't you expect the last echo to also print 1? If not - why?
...
I have a page in wordpress where I want to embed a player of some sorts that can take the first 3-5 items from a podcast xml feed and embed them in a player with a playlist. Preferable if the title and description can be shown as well.
There is most likely plugins or scripts that does this but I just can't seem to find any. A hint for s...
Hello,
I need svn revision number from PHP script. I have used the following commands with exec(). But it does not return any thing.
$value = exec("usr/bin/svn --username myusername--password mypassword info /home/mysite/mysite_www/mysite |grep Revision: |cut -c11-", $output, $status);
or
$value = exec("svn info |grep Revision: |cu...
I am using Eclipse PDT Helios with Aptana Studio. on Windows XP.
Very often, my workflow is interrupted because Eclipse starts a DLTK indexing process that lasts 30 seconds, sometimes up to 2 minutes - which is annoying.
I wonder if there is any way to:
Either turn that off or
Run the DLTK indexing process less frequently.
I didn't ...
I'm rendering a partial from inside a task in symfony 1.4.6...
$this->configuration = $this->createConfiguration(app, env, false);
$this->configuration->loadHelpers(array('Partial'));
$context = sfContext::createInstance($this->configuration);
$html = get_partial(partialName, params);
...Inside the partial there is a reference to a c...
I have an application that let users to upload files to server. All files are stored in one directory called Uploaded Files (which has Thumbnails directory inside).
What are the most common ways for preventing users to see these files ? I mean I don't want users to see the files by typing URL like /path_to_website/Uploaded Files/1.png.
...
Dear All,
I develop a wap portal for games. My problem is to detect handset device perfectly. My games provider provide me the supported handset list like this:
Nokia6300, SGH-X200, MOT-C261, SIE-CX70, SAMSUNG-SGH-Z140
So, I have to detect the supported games for the particular wap user.
I can easily detect the handset for nokia d...
Hello,
I am getting json data from my server to show them as a table.
$('#queryFrom').ajaxForm({
dataType: 'json',
beforeSubmit: showRequest, // pre-submit callback
success: processJson,
e...
So i know this is an odd way of doing it but ill try and explain.
I have the following table
trackingPoint{id, moduleId, lat, long, timestamp, first, last}
I now have the problem where points might arrive out of order. The php that handles the entry generates a trip record but it relies on order. I could adapt this script but im lookin...
I'm stuck. I just want a simple OR inside an if condition and php always raises an error:
My Code:
if( ($value > 0.01 || $seconds < 100) ):
Error:
Parse error: syntax error, unexpected T_VARIABLE
...
hey there
i want to include my php file but i get an error
my page contains javascript
this is the error i am getting
[Thu Aug 05 15:38:01 2010] [error] [client 10.0.0.2] <br/><br/>Unexpexted output: \r\n<html>\r\n\r\n\r\n\r\n<script language="javascript" type="text/javascript" src................
this is my server code , i am c...
I've overridden the views-view.list.tpl.php. I want to optionally included some extra HTML markup if a value in a CCK field for the current node is set to certain values.
How can I access CCK field values in a views-view.list.tpl.php view template file?
...
I'm trying to extract the subdomain from the HTTP_HOST value. However I've stumbled into a problem where if the subdomain has more than one dot in it it fails to match properly. Given that this is a script to run on multiple different domains and it could have an unlimited amount of dots, and the tld could be either 1 or 2 parts (and any...
I have the following code:
{$product.name}
This outputs all of our products, unfortunatly they are stored in the database as 'CompanyNameProductName'.
I want to remove the string 'CompanyName' from the string $product.name
How can I do this in PHP?
...
I just had this thought, I don't know if I am slow though.
Usually, I store the id of the item I am editing in a hidden field. Then in backend (I am using PHP/Zend Framework btw), I get it to determine which item gets edited. But then I thought, in something more secure, eg. edit profile, the user can somehow edit a hidden field right...