Úpravy kódu v
localhoste. Pracujeme v
XAMPP s
PHP 7+. Tymto chceme ukazat, ze aj XOOPS sa da rozne upravovat. Ze to nie je striktne holy system, ale ze sa vie zmenit na cokolvek. / blue /
LOCALHOST INSTALACIA
---------------------------------------------------------
Pri instalacii je potrebna funkcia Internationalization. Ta vsak v PHP nemusi byt automaticky zapnuta. Teda pocas instalacie sa objavi chyba pri kontrole (tretie okno instalacie):
Internationalization functions extension
Tuto funkciu je treba zapnut v subore php.ini. Najdi riadok:
;extension=php_intl.dll
a odstran z neho pociatocny znak " ; " . Tym zapojis do php kniznicu php_intl.dll zapnes funkciu Internationalization .
ZAKLADNY XOOPS STYL
subor xampp2/htdocs/xoops3/xoops.css
- riadok 191, uprava:
div.jGrowl div.jGrowl-notification, div.jGrowl div.jGrowl-closer {
color:#fff;padding:35px 5px;font-size:30px;text-align:center;display:none;
z-index:9999;position:fixed;top:52px;left:5px;right:5px;background: rgba(0, 0, 0, 0.9) url(../images/login-bg.png) repeat;transition: opacity 500ms;}
- riadok 131 - zmena v "input[type=submit], input[type=reset], input[type=button], .xo-formbuttons, .formButton, button", kde dostal osobitny dizajn zaverecny "button", preto treba riadok 131 s celym obsahom obmenit za nasledovne:
input[type=submit], input[type=reset], input[type=button], .xo-formbuttons, .formButton {background-color:#D3D2D6;color:#405A80;padding:3px;}
button {background-color:#429bdf;color:#fff;padding:10px 15px;border-radius:50px;border:5px solid #fff;}
Riadok 191 a 131 upravuju hlasenie o prihlaseni a odhlaseni. 191 je zmena okna hlasenia, 131 zmena tlacidla pre zatvorenie hlasenia.
MODUL News
subor xampp2/htdocs/xoops3/modules/news/blocks/newstop.php
ma doplneny riadok:
$news['title_with_link2'] = sprintf(XOOPS_URL . '/modules/news/article.php?storyid=' . $story->storyid());
kvoli odkazu v uvodnom bloku (riadok 412)
MODUL News
subor xampp2/htdocs/xoops/modules/news/class/class.newstory.php
ma skryty riadok 926-929 ktory ukazoval pocet zostavajucich bytov na precitanie ... proste zbytocnost
dalej hned za tym bol skryty cely odstavec (cca 26 riadkov), ktory za "...citat viac" doplnil aj pocet komentarov k clanku
MODUL News
oprava v subore news/class/class.newsstory.php
upraveny riadok 848
original:
$ret = '<a titls='
zmeneny na:
$ret = '<a title='
MODUL News
subor xampp2/htdocs/xoops/modules/news/index.php
upraveny riadok 206
original: $story['news_title'] = $story['title'];
zmeneny na:
$story['news_title'] = "
" . $story['title'] . "
$thisstory->subtitle
";
Tymto sa zabezpecilo, ze odkaz na clanok je blok a lepsie sa klika na odkaz v Title. Tiez sa pod Title doplnil aj Subtitle. Ak je, zobrazi sa v cervenom bloku text. Ak nie je, zobrazi sa iba cerveny pasik.
MODUL News
subor xampp2/htdocs/xoops/modules/news/article.php
upraveny riadok 181
original:
$story['news_title'] = $article->title();
zmeneny na:
$story['news_title'] = " " . $article->title() . "
";
To iste ako predtym, tymto sa zabezpecilo, ze odkaz na clanok je blok a lepsie sa klika na odkaz v Title.
MODUL News
subor xampp2/htdocs/xoops/modules/news/article.php
pridany riadok 182
$story['news_title2'] = " " . $article->title() . "
";
Je to nadpis clanku bez linku. V samotnom clanku nie je potrebne odkazovat na clanok, v ktorom prave som. Preto tato uprava.
Class - Pagenav
subor xampp2/htdocs/xoops3/class/pagenav.php
riadok 84, odstranene zatvorky pri aktivnej stranke:
$ret .= '(' . $counter . ') ';
riadok 78, odstranene podciarknutie lavych sipiek:
$ret .= '« ';
riadok 98, odstranene podciarknutie pravych sipiek:
$ret .= '» ';
MODUL Newbb
subor xampp2/htdocs/xoops/modules/newbb/index.php
pridany riadok 194 (hned za ukoncenym IF)
$cat_image = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/assets/images/category/' . $onecat['cat_image'];
kvoli spravnemu zobrazeniu obrazkov kategorii (zmenene $cat_image na $onecat['cat_image'])
MODUL Newbb
upraveny subor xampp2/htdocs/xoops/modules/newbb/viewtopic.php
riadok 355, cely odstranit. Teda konkretne tento kod:
include $GLOBALS['xoops']->path('class/pagenav.php');
Pokial je v jednom topicu tolko prispevkov, ze uz ma zobrazit page navigator, vyhlasi fatalnu chybu. Pokial sa odstrani vyssie spomenuty kod, chyba zmizne. Ide o konflikt XoopsPageNav modulu Forum s jadrom Xoops.
MODUL Newbb
upraveny subor xampp2/htdocs/xoops/modules/newbb/class/post.php
Uprava nadpisu - zmena na cervenu farbu a podciarknute.
riadok 211:
$post_attachment .= '' . _MD_ATTACHMENT . '
';
Odstranenie zbytocnej ciary HR:
riadok 212:
$post_attachment .= '';
Teraz ide o upravu dizajnu prilozeneho suboru.
riadok 270, doplneny dizajn (cervena ciarka):
. ' | '
riadok 274, doplneny dizajn (cervena ciarka):
. ' | '
riadok 275, vymenene slovo za vlastne, kedze HITS sa nehodilo:
. _THEME_FORUM_VIDENIA
Dalej ide v tom istom subore o info o uprave prispevku. Vykonali sa dve zmeny.
riadok 362, doplneny dizajn a odstranene zbytocnosti:
$post_edit .= 'Úprava
' . $edit_user . '|' . formatTimestamp((int)$edit_time) . '
';
riadok 364, doplneny dizajn a odstranene zbytocnosti:
$post_edit .= '' . _MD_EDITEDMSG . ' ' . $edit_msg . '
';
MODUL Newbb
upraveny subor xampp2/htdocs/xoops/modules/newbb/post.php
NEMYL SI TENTO SUBOR S POST V CLASS!
Upraveny a premazany riadok 503:
'meta' => '' . $p_date . '',
Ide o nahlad upravovaneho prispevku. Je upraveny tak, aby bol rovnaky, ako riadny prispevok.
MODUL Newbb
upraveny subor xampp2/htdocs/xoops/modules/newbb/edit.php
Upraveny a premazany riadok 138:
'meta' => '' . $p_date . '',
Ide o zobrazenie prispevku pod folmularom pre upravu prispevku. Znova je upraveny tak, aby bol rovnaky, ako riadny prispevok.
MODUL Newbb
upraveny subor xampp2/htdocs/xoops/modules/newbb/moderate.php
Upraveny riadok 109 - odstranene riadky 109 az 119, t.j. cele privitanie v okne a nahradene kodom:
echo '';
Upraveny riadok 120:
echo '' . _MD_SUSPEND_MANAGEMENT . '
';
MODUL Newbb - problem so skenerom virusov
upraveny subor xampp2/htdocs/xoops/modules/newbb/class/icon.php
odstraneny riadok 192:
// START hacked by irmtfan - improve function to CSS3 buttons - add alt and title attributes - use span instead of button to support IE7&8
odstraneny riadok 199:
// END hacked by irmtfan - improve function to CSS3 buttons
Webscanner tieto riadky definoval ako virusy.
MODUL Newbb - problem so skenerom virusov
upraveny subor xampp2/htdocs/xoops/modules/newbb/class/post.php
odstraneny riadok 360:
// START hacked by irmtfan
odstraneny riadok 364:
// START hacked by irmtfan
Webscanner tieto riadky definoval ako virusy.
MODUL Newbb - problem so skenerom virusov
upraveny subor xampp2/htdocs/xoops/modules/newbb/class/user.php
odstraneny riadok 233:
// START hacked by irmtfan - easier rank getting - consistency with previous version back rank.title and rank.image
odstraneny riadok 239:
// END hacked by irmtfan - easier rank getting - a little correctness dot removed
odstraneny riadok 240:
// START hacked by irmtfan - easier groups getting - can we use $_SESSION['xoopsUserGroups']???
odstraneny riadok 248:
// END hacked by irmtfan - easier groups getting - can we use $_SESSION['xoopsUserGroups']???
Webscanner tieto riadky definoval ako virusy.
MODUL Newbb - problem so skenerom virusov
upraveny subor xampp2/htdocs/xoops/modules/newbb/include/functions.render.php
odstraneny riadok 117:
// START hacked by irmtfan
odstraneny riadok 130:
// END hacked by irmtfan
Webscanner tieto riadky definoval ako virusy.
MODUL Newbb - problem so skenerom virusov
upraveny subor xampp2/htdocs/xoops/modules/newbb/include/plugin.php
odstraneny riadok 84:
// START hacked by irmtfan
odstraneny riadok 103:
// END hacked by irmtfan
Webscanner tieto riadky definoval ako virusy.
MODUL Newbb - problem so skenerom virusov
upraveny subor xampp2/htdocs/xoops/modules/newbb/header.php
odstraneny riadok 90:
// START hacked by irmtfan to add localization/customization for newbb style.css
odstraneny riadok 104:
// END hacked by irmtfan to add localization/customization for newbb style.css
Webscanner tieto riadky definoval ako virusy.
MODUL NEWBB chyby:
BREADCRUMBS - ked prejdem do subfora, neukaze mi jednu vetvu vyssie
FORUM - v prispevkoch sa nezobrazuju tagy. Problem bude skor v module Tag, ktory ma problem aj s vlastnou aktualizaciou.
MODUL Publisher
upraveny subor xampp2/htdocs/xoops/modules/publisher/class/category.php
riadok 238:
return "" . $this->name() . '';
Doplneny dizajn pre title.
MODUL Publisher
upraveny subor xampp2/htdocs/xoops/modules/publisher/class/item.php
riadok 729:
$item['titlelink'] = $this->getItemLink('itemTitle1', $maxCharTitle);
Vymeneny css titlelink na itemTitle1
MODUL Publisher - problem so skenerom virusov
upraveny subor xampp2/htdocs/xoops/modules/publisher/index.php
odstraneny riadok 72:
// Hide sub categories in main page only - hacked by Mowaffak
Webscanner tieto riadky definoval ako virusy.
MODUL Profile
upraveny subor xampp2/htdocs/xoops/modules/profile/userinfo.php
doplneny riadok 224:
$GLOBALS['xoopsTpl']->assign('name', $thisUser->getVar('name'));
doplnene skutocne meno ako alternativna k prezyvke zobrazenej v hlavicke profilu
MODUL Profile
upraveny subor xampp2/htdocs/xoops/modules/profile/include/forms.php
zmeneny riadok 518:
$form->addElement(new XoopsFormButton('', 'submitButton', _US_SAVECHANGES, 'submit'));
uprava dizajnu tlacidla Submit
MODUL Profile
upraveny subor xampp2/htdocs/xoops/modules/profile/changepass.php
zmeneny riadok 35:
$form->addElement(new XoopsFormButton('', 'submitButton', _SUBMIT, 'submit'));
uprava dizajnu tlacidla Submit
MODUL Profile
upraveny subor xampp2/htdocs/xoops/modules/profile/changeemail.php
zmeneny riadok 38:
$form->addElement(new XoopsFormButton('', 'submitButton', _SUBMIT, 'submit'));
uprava dizajnu tlacidla Submit
MODUL Profile
upraveny subor xampp2/htdocs/xoops/modules/profile/edituser.php
zmeneny riadok 122:
$form->addElement(new XoopsFormButton('', 'submitButton', _SUBMIT, 'submit'));
uprava dizajnu tlacidla Submit
zmeneny riadok 141:
$form2->addElement(new XoopsFormButton('', 'submitButton', _SUBMIT, 'submit'));
uprava dizajnu tlacidla Submit
MODUL PM
upraveny subor xampp2/htdocs/xoops/modules/pm/viewpmsg.php
upraveny riadok 189:
include_once $GLOBALS['xoops']->path('class/pagenav.php');
zmena z include na include_once
MODUL WFDOWNLOADS
upraveny subor xampp2/htdocs/xoops/modules/wfdownloads/visit.php
doplneny riadok 128:
echo " < div id='x sk-content' style='padding:20px;'>";
a upraveny riadok 136:
echo "</d iv></d iv> n";
Je to uprava dizajnu pre temu xoops3 - proces odpoctu sekund pred spustenim stahovania.
MODUL WFDOWNLOADS
upraveny subor xampp2/htdocs/xoops/modules/wfdownloads/brokenfile.php
upraveny riadok 135:
$sform = new XoopsThemeForm(_THEME_WD_BROKENFILE_FTITLE, 'reportform', xoops_getenv('PHP_SELF'));
upraveny riadok 140:
$submit_button = new XoopsFormButton('', 'submit', _THEME_WD_BROKENFILE_SUBMIT, 'submit');
Zmeny textov.
Obrazky/ikony - viacere su vymenene v systeme, aj v moduloch. Zvycajne ide o Edit, Delete a podobne.
Ak by si mal zaujem mat rozlozenie prispevkov v module NEWS podla TABLE, tak odporucame nasledovne:
1. v subore news_index.html vymen originalny kod za tento:
---------------------------------------------------------------------------------
<{section name=i loop=$columns}>
<{foreach item=story from=$columns[i]}><{include file="db:news_item.tpl" story=$story}><{/foreach}> |
<{/section}>
<{section name=i loop=$columns}>
<{foreach item=story from=$columns[i]}><{include file="db:news_item.tpl" story=$story}><{/foreach}>
<{/section}>
---------------------------------------------------------------------------------
2. v subore news_item.html odstran kod z div col-md-6.
3. do suboru style.css tejto temy pridaj kod:
---------------------------------------------------------------------------------
#xsk-news-block {padding-top:10px;}
#xsk-news-block2 {padding-top:10px;}
@media screen and (max-width: 767px) {
#xsk-news-block {display:none;}
}
@media screen and (min-width: 768px) {
#xsk-news-block2 {display:none;}
}
---------------------------------------------------------------------------------
4. v nastaveniach modulu zvol 2 stlpce.