Íàçâàíèå ãàëåðåè - Ãëàâíàÿ Íàçâàíèå ãàëåðåè - Ãëàâíàÿ
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Íàçâàíèå ãàëåðåè - Ãëàâíàÿ

Started by x525, September 26, 2007, 03:09:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

x525

Íàçâàíèå ãàëåðåè - Ãëàâíàÿ, ïîìîãèòå óáðàòü "Ãëàâíàÿ"

Alex Revo

êàê âàðèàíò íàéòè ýòîò òåêñò â ÿçûêîâîì ôàéëå è çàìåíèòü íà ""

x525

Ïðîáîâàë íàéòè, íî òàì åãî íåò >:(

x525

Èçâèíèòå, èñêàë "ãëàâíàÿ", âìåñòî "Ãëàâíàÿ"

x525

Ïîñëå óäàëåíèÿ "Ãëàâíàÿ" âûñêàêèâàåò "Äîáðî ïîæàëîâàòü", â ïåðåâîäå âñòðå÷àåòñÿ 3 ðàçà, åñëè óäàëèòü "Äîáðî Ïîæàëîâàòü", òî âñå íîðìàëüíî. Íî íà ñêîëü ïîñòðàäàåò ïåðåâîä? È åñëè äðóãîé ñïîñîá íå òðîãàÿ ïåðåâîä?

Alex Revo

Äðóãîé ñïîñîá - ïðàâèòü êîä.
À ÷òîáû íå ñèëüíî ïîñòðàäàë ïåðåâîä, îïðåäåëèòå â êàêîå èç 3 âõîæäåíèé "Äîáðî ïîæàëîâàòü" îòîáðàæàåòñÿ â òèòëå, åãî óáåðèòå, îñòàëüíûå îñòàâüòå.

Alex Revo

#6
ß íàøåë õîðîøèé ñïîñîá ïîáîðîòü ýòî:

Îòêðûâàåì theme.php ñâîåé òåìû, ïåðåä ?> äîáàâëÿåì êîä:

// Function for writing a pageheader
function pageheader($section, $meta = '')
{
    global $CONFIG, $THEME_DIR;
    global $template_header, $lang_charset, $lang_text_dir;

    $custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);

        $charset = ($CONFIG['charset'] == 'language file') ? $lang_charset : $CONFIG['charset'];

    header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
        header("Content-Type: text/html; charset=$charset");
    user_save_profile();

    $template_vars = array('{LANG_DIR}' => $lang_text_dir,
        '{TITLE}' => $CONFIG['gallery_name'] . ' - ' . strip_tags(bb_decode($section)),
        '{CHARSET}' => $charset,
        '{META}' => $meta,
        '{GAL_NAME}' => $CONFIG['gallery_name'],
        '{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
        '{SYS_MENU}' => theme_main_menu('sys_menu'),
        '{SUB_MENU}' => theme_main_menu('sub_menu'),
        '{ADMIN_MENU}' => theme_admin_mode_menu(),
        '{CUSTOM_HEADER}' => $custom_header,
        );

    echo template_eval($template_header, $template_vars);
}

èç theme.inc.php

Çàòåì ïåðåä ñòðîêîé
$template_vars = array('{LANG_DIR}' => $lang_text_dir,

Äîáàâëÿåì:

if ((defined('INDEX_PHP')) && (empty($_GET['pos'])) && (empty($_GET['cat'])) && (empty($_GET['album']))) {
  $new_title = "Ìîÿ ãàëåðåÿ";
    } else {
$new_title = strip_tags(bb_decode($section)) . ' - ' .$CONFIG['gallery_name']; 
}


íèæå ñòðîêó
'{TITLE}' => $CONFIG['gallery_name'] . ' - ' . strip_tags(bb_decode($section)),
ìåíÿåì íà
'{TITLE}' => $new_title,

 ñòðîêå$new_title = "Ìîÿ ãàëåðåÿ";
ìåíÿåì òåêñò íà ñâîé

Îáðàòèòå âíèìàíèå, ÿ ïîìåíÿë ïîðÿäîê ôîìèðîâàíèÿ çàãîëîâêà, òåïåðü ïåðâûì èäåò íàçâàíèå ñòðàíèöû ïîòîì + íàçâàíèå ãàëåðåè. Â ïëàíå ïîèñêîâîé îïòèìèçàöèè òàê áóäåò ëó÷øå. Åñëè âàì íå íðàâèòñÿ ïîìåíÿéòå ìåñòàìè ïåðåìåííûå â $new_title.

Òåïåðü íà ãëàâíîé ñòðàíèöå ãàëåðåè áóäåò òèòë "Ìîÿ ãàëåðåÿ" (èëè òîò êîòîðûé âàì íóæåí).

Íà ñòðàíèöû ïîêàçà ôîòî òèòë ôîðìèðóåòñÿ òàê:
"Íàçâàíèå àëüáîìà/Èìÿ ôîòî - Íàçâàíèå ãàëåðåè"
*Åñëè èìÿ ôîòî íå çàäàíî âñòàâëÿåòñÿ èìÿ ôàéëà, êàê ýòî óáðàòü ïîêà íå íàøåë.

Íà ñòðàíèöå ñïèñêà ôîòî àëüáîìà òàê:
"Èìÿ àëüáîìà - Íàçâàíèå ãàëåðåè"

Íà ñòðàíèöå ñïèñêà àëüáîìîâ òàê:
"$new_title (ìîÿ ãàëåðåÿ) > Èìÿ êàòåãîðèè (>Èìÿ ïîäêàòåãîðèè) - Íàçâàíèå ãàëåðåè"

Èñòî÷íèê