Top Rated Codes
Error on autocomplete node reference field: found no valid post with that title.
Wed, 04/14/2010 - 15:58 | gurayc
When importing content into a node reference field that is shared the preview import throws the following error:
Fieldname: found no valid post with that title.
I have found the cause of this problem and can offer a partial solution.
The cause is that the validation function nodereference_autocomplete_validate in nodereference.module expects data in a different format than what is supplied by nodereference.inc of node_import. This function expects data in one of three forms:
"node title"
"node title [nid:node id]"
"[nid:node id]"
I was able to make it work for importing noderefs by node id. I have not tested it with importing noderefs by title, although that might work also. In the file node_import/supported/cck/nodereference.inc, the line
5
Average: 5 (1 vote)
Drupal : Evaluate PHP in pattern + Token
Thu, 04/08/2010 - 13:50 | gurayc
How to use tokens with PHP in Drupal? Here is the answer.
5
Average: 5 (1 vote)
Phpmyadmin blowfish_secret error
Sun, 03/28/2010 - 02:10 | gurayc
If you get this error on your phpmyadmin : "The configuration file now needs a secret passphrase (blowfish_secret)."
5
Average: 5 (1 vote)
PHP random number generator
Fri, 03/26/2010 - 12:21 | gurayc
Generate random number with this function.
5
Average: 5 (1 vote)
PHP random color generator
Fri, 03/26/2010 - 12:17 | gurayc
Generate random color with this function.
5
Average: 5 (1 vote)
PHP explode example
Fri, 03/26/2010 - 12:15 | gurayc
Parse text with php explode function.
5
Average: 5 (1 vote)
RSS/XML Date Output format
Fri, 03/26/2010 - 12:13 | gurayc
Put date to your rss or xml output.
5
Average: 5 (1 vote)
Deamon example in python
Thu, 03/25/2010 - 01:07 | bbayer
Deamonizing a process could be described as simply closing standart i/o files and release it from console. In python this could be achieved by using os module. For details google fork
5
Average: 5 (1 vote)
Parsing config files in Python
Tue, 03/23/2010 - 22:36 | bbayer
In Python standart library there is lots of usefull stuff, ConfigParser parser module is one of them. This module provides lots of functionality for parsing and writing configuration files. In Windows this configuration files called "ini files".
An example ini file is like that
[logging]
log_mode=debug
[properties]
win_height=230
5
Average: 5 (1 vote)
Recent comments
-
That is cool!12 weeks 4 days ago
-
sexcam13 weeks 6 days ago
-
thanx26 weeks 4 days ago
-
It is very usefull man thanks26 weeks 4 days ago
-
not at all26 weeks 5 days ago
more

