January 17th, 2010
Colaborator Joomla la AG Prime in Cluj-Napoca, Iasi, Bucuresti, Timisoara
Salut,
Caut programator Joomla pentru colaborare pe un proiect.
Este vorba de un proiect existent, ce are nevoie de modificari de continut / CSS.
De asemeni trebuie configurate / instalate module de SEO (peste un director Sigsiu Sobi2).
Oferta este de tip project-based, cu posibilitatea unei colaborari de lunga durata.
Daca ai experienta cu Joomla si de preferabil cu directorul de la Sigsiu email la:
gabriel.ungureanu AT ag-prime DOT com
Tags: job, joomla, php, project based
Posted in Uncategorized | No Comments »
September 22nd, 2009
Salut,
Public si rezultatele chestionarului de Drupal la PHP GeekMeet Cluj-Napoca. Initial as fi vrut sa las chestionarul sa se desfasoare pe o perioada mai lunga dar am convenit ca raportat la prezenta normala la un PHP GeekMeet Cluj, un numar de 20 de respondenti pot fi considerati esantion reprezentativ.
Aici sunt si rezultatele:
|
De cate ori ai participat la PHP GeekMeet ?
|
|
|
| Nu am fost niciodata |
|
8 |
38% |
| E prima data |
|
4 |
19% |
| Vin des |
|
7 |
33% |
| Am fost la toate intalnirile |
|
2 |
10% |
People may select more than one checkbox, so percentages may add up to more than 100%.
|
|
Folosesti Drupal?
|
|
|
| Folosesc deja |
|
4 |
19% |
| Nu, dar poate am sa incerc |
|
9 |
43% |
| Nu si nici nu voi folosi |
|
8 |
38% |
People may select more than one checkbox, so percentages may add up to more than 100%.
|
|
Te intereseaza si alte prezentari de Drupal?
|
|
|
|
Tags: drupal, geekmeet, php
Posted in News, Off-subject, Web development | 2 Comments »
September 21st, 2009
Recent, am avut o prezentare la PHP GeekMeet Cluj Napoca, referitoare la Drupal.
Elemente de baza, avantajele si dezavantajele utilizarii Drupal ca unealta de lucru.
Prezentarea o gasiti aici:
Tags: drupal, php
Posted in Web development | No Comments »
July 21st, 2009
Hi, I recently found a very problematic situation. Wanted to ‘travel’ through some language aware links and Drupal l() function does not process with the language switcher.
I found a very particular solution (only to be used with Path prefix language negotiation ).
I used it inside my template.php file, and used it as THEMENAME_l($text, $path, $options)
So the code for custom l() is:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
| function THEMENAME_l($text, $path, $options = array()) {
global $language;
// Merge in defaults.
$options += array(
'attributes' => array(),
'html' => FALSE,
);
// Append active class.
if (($path == $_GET['q'] || ($path == '<front>' && drupal_is_front_page())) &&
(empty($options['language']) || $options['language']->language == $language->language)) {
if (isset($options['attributes']['class'])) {
$options['attributes']['class'] .= ' active';
}
else {
$options['attributes']['class'] = 'active';
}
}
// Remove all HTML and PHP tags from a tooltip. For best performance, we act only
// if a quick strpos() pre-check gave a suspicion (because strip_tags() is expensive).
if (isset($options['attributes']['title']) && strpos($options['attributes']['title'], '<') !== FALSE) {
$options['attributes']['title'] = strip_tags($options['attributes']['title']);
}
// a small url tweak
$url = check_url(url($path, $options));
$url = base_path().(!empty($options['language'])?$options['language']->language:'').'/'.str_replace(base_path(),'',$url);
// -------------------
return '<a href="'. $url .'"'. drupal_attributes($options['attributes']) .'>'. ($options['html'] ? $text : check_plain($text)) .'</a>';
} |
Tags: drupal, i18n, multilanguage, php
Posted in Web development | No Comments »
June 30th, 2009
This is a verry simple captcha challenge. It’s based on the algorithm of Scott Allen (http://www.hybrid6.com/webgeek/plugins/wp-spamfree), a captcha free plugin for WordPress.
The user has to do no other input, just it’s browser should support javascript and cookies. (~95% of internet users have this). So might stop annoying 95% of your users and advice the other 5% to install javascript or to allow cookies support for their browser.
The process is very simple. This module requires CAPTCHA Module (http://drupal.org/project/captcha).
After installing both modules, you simply goto configuration page of CAPTCHA Module admin/user/captcha and chose default challenge type to: Invisible CAPTCHA (from module invisible_captcha).
And that’s it. More information on CAPTCHA module here.
Later edit: Updated to comply with user permisions.
Tags: captcha, drupal, module, php
Posted in Web development | No Comments »
December 12th, 2008
Ciudat, interesant totusi ca in PHP se folosesc foarte des array-urile.
Oricum ideea e ca nu poti defini constante in PHP, adica asa:
1
2
3
| // it will not work like this
define('MY_ARRAY', array ('one', 'two', 'three'));
echo MY_ARRAY[0]; // undefined index 0 |
Dar sunt vreo doua variante prin care poti face asta. Una ar fi sa salvezi de exemplu un string in constanta:
1
2
3
4
| define ('MY_ARRAY', 'one,two,three');
$my_local_array = explode(',',MY_ARRAY);
echo $my_local_array[0]; // it will work
// result: one |
sau poti sa serializezi obiectul (cea mai recomandata), astfel poti sa salvezi array-uri sau orice alte obiecte complexe:
1
2
3
4
5
6
7
8
9
| // va recomand aceasta varianta, e cea mai simpla si are cea mai larga aplicabilitate
$arr = array ("one" => 1, "two" => 2, "three" => 3); // variabila de definit
define ('MY_ARRAY',serialize($arr)); // salvam obiectul serializat
$my_local_array = unserialize(MY_ARRAY); // il deserializam pentru a-l putea folosi
echo $my_local_array['one']; // and there you go :)
// result: 1 |
Tags: php, tips&tricks
Posted in Stiati ca?, Web development | No Comments »
December 9th, 2008
Usualy, header() function can be used to change page headers, linke header(“Content-type: jpg’);
But, a most use case is, for example when you want to check user login:
1
2
3
4
5
6
7
8
9
| <?php
if (!$user->isLogged()) {
header("Location: login.php");
}
?> |
The problem is, there are some cases when the script continues to run after header(“Location: “), and you should allways die() after the header(“Location: “).
Like this:
1
2
3
4
5
6
7
8
9
| <?php
if (!$user->isLogged()) {
header("Location: login.php");
die();
}
?> |
Tags: php, tips&tricks
Posted in Web development | No Comments »
December 6th, 2008
Recently, I encountered that problem. I was working with a PHP engine wich was using php short_open_tags:
1
2
3
| <?
// open PHP tag using <? instead of <?php
?> |
So very simple, I wanted to change the property by the simple way, tray icon -> PHP -> PHP Settings -> short open tag.
Ok the option is ticked, but the engine still doesn’t start. The issue. Looks like my version of PHP: 5.2.6, applies this setting only if set last on config file. So after many minutes of mistery, just adding line:
at the end of my php.ini file, solved the proble.
Tags: bugs, configuring, php, wampserver
Posted in Web development | No Comments »