miercuri, 15 august 2012

Joomla 1.5 rel nofollow

1. modify file: /modules/mod_mainmenu/helper.php on line 362
replace line
$data = '<a href="'.$tmp->url.'">'.$image.$tmp->name.'</a>';
width


if(strpos($iParams->get('pageclass_sfx'),'nofollow') !== false) {
    $data = '<a href="'.$tmp->url.'" rel="nofollow">'.$image.$tmp->name.'</a>';
      } else {
    $data = '<a href="'.$tmp->url.'">'.$image.$tmp->name.'</a>';
   }

2. modify file: /modules/mod_mainmenu/tmpl/default.php - > comment line 75
//$node->removeAttribute('rel');
3.edit menu item - Parameters System‎- page class suffix - noffolow

vineri, 17 iunie 2011

Remove Powered by PrestaShop on main shop

In 
modules/blockvariouslinks/blockvariouslinks.tpl
or
module/blockcms/blockcms.tpl 
comment line 59


...{l s='Powered by' mod='blockcms'}...









joi, 16 iunie 2011

Change logo when changing languages

1. create logo for each language and save it to /img folder, with following name
logo_en.jpg
logo_ro.jpg
2. change following line in /themes/prestashop/header.tpl
<h1 id="logo"><a href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}"><img src="{$img_ps_dir}logo.jpg" alt="{$shop_name|escape:'htmlall':'UTF-8'}">a>h1>
in

<h1 id="logo"><a href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}"><img src="{$img_ps_dir}logo_{$lang_iso}.jpg" alt="{$shop_name|escape:'htmlall':'UTF-8'}">a>h1>

Prestashop modify logo and link when click logo

in /themes/prestashop/header.tpl

go to line

<h1 id="logo"><a href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}"><img src="{$img_ps_dir}logo.png" alt="{$shop_name|escape:'htmlall':'UTF-8'}">a>h1>

vineri, 3 iunie 2011

Radio GSP s-a lansat in online

Radio GSP - cel mai bun radio online de sport il puteti asculta live la adresa http://www.tvy.ro/radio/Radio-GSP

marți, 24 mai 2011

Validate_password

function validate_password($password, $min_char = 4, $max_char = 20)
{
$password = trim($password);
return $eregi = eregi('^[a-zA-Z0-9_]{'.$min_char.','.$max_char.'}$', $password);
}

if (validate_password($password)==false)
{$error[]="Wrong password";}

PHP validate email


function isValidEmail($email){
return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email);
}

$email=mysql_real_escape_string($_POST['email']);
if (isValidEmail($email)==true) echo "OK";
if (isValidEmail($email)==false) echo "Not Okay";
?>

marți, 3 noiembrie 2009

Virus. Disable show hidden files



If you open Folder Option and check "Show hidden files and folders " you can not see hidden files.
To enable "Show hidden files and folders" feature follow below steps :
Go to Start menu -> Run ->type Regedit
Go to the following registry key:
HKEY_LOCAL_MACHINE->Microsoft -> Windows -> Current Version -> Explorer -> Advanced -> Folder -> Hidden -> SHOWALL.
Delete the value CheckedValue.
Create a new DWORD value called CheckedValue (same as above, except that the type is REG_DWORD).
Modify the value data to 1 (0×00000001). This should enable you to select the ‘Show hidden files and folders’ option without much problem.


luni, 26 octombrie 2009

Wscript windows install date

Dim WshShell, TimeStamp
Set WshShell = WScript.CreateObject("WScript.Shell" )

TimeStamp = WshShell.RegRead(_"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\installdate" )

WScript.Echo "Install date mm/dd/yyyy :" & _DateAdd("s", TimeStamp, DateSerial(1970, 1, 1)) '

WBScript DateSerial Function

The DateSerial function returns a Variant of subtype Date for a specified year, month, and day.

Syntax: DateSerial(year,month,day)




yearRequired. A number between 100 and 9999, or a numeric expression. Values between 0 and 99 are interpreted as the years 1900–1999. For all other year arguments, use a complete four-digit year
monthRequired. Any numeric expression
dayRequired. Any numeric expression

Example:



document.write(DateSerial(1996,2,3))2/3/1996
document.write(DateSerial(1990-20,9-2,1-1))6/30/1970


WBScript DateAdd Function

The DateAdd function returns a date to which a specified time interval has been added.

Syntax: DateAdd(interval,number,date)




intervalRequired. The interval you want to add

Can take the following values:

* yyyy - Year
* q - Quarter
* m - Month
* y - Day of year
* d - Day
* w - Weekday
* ww - Week of year
* h - Hour
* n - Minute
* s - Second
numberRequired. The number of interval you want to add. Can either be positive, for dates in the future, or negative, for dates in the past
dateRequired. Variant or literal representing the date to which interval is added

Example:



document.write(DateAdd("m",1,"31-Jan-00"))2/29/2000
document.write(DateAdd("m",1,"31-Jan-01"))2/28/2001

vineri, 20 martie 2009

Sterge "storage; removable media; usb stick; flash drive; usbstor" din registry

RegScanner
RegScanner este un executabil care nu necesita instalare sau alte librarii. Download de la urmatoarea adresa: http://www.nirsoft.net/utils/regscanner.html

Exemplu:

Pasul 1:Cautare



Caut stringul „USBSTOR” in HKEY_LOCAL_MACHINE atat ca VALUES, DATA sau KEYS


Pasul 2: Selectare si creare fisier cu rezultatele necesare



Se vor selecta campurile necesare intoarse de cautare(CTRL+A pentru toate) si se vor salva intr-un fisier .reg (File->Create Delete .Reg File).

Pasul 3: Modificare fisier creat la Pasul 2 pentru a sterge rezultatele selectate.

Click dreapta pe fisierul creat la Pasul 2 -> ‚Edit’, sau ‚Open With’ cu Notepad.
Ctrl+h -> Find what = HKEY_LOCAL_MACHINE; Replace with= -HKEY_LOCAL_MACHINE; Replace All.(„-„ delete keys in registry)

Pasul 4: Drepturi Full-control pentru Everyone.. si nu numai(trebuie vazut ca nu ia la toate.....)

Start-Run-regedit. Click dreapta pe HKEY_LOCAL_MACHINE---Permissions-Add-Advanced- Find Now- select Everyone- Ok-Ok- Ok .

Pasul 5: Rulare .reg
Dublu click pe .reg creat la Punctul 2 sau Start-Run-Cmd---regedit /s /.reg
Ex: regedit /s c:/del_usbstor.reg

Pasul 6: Restart.