XOOOPS HACK

xiaoxiao2021-03-06  43

Content list

XOOPS multi-brokers Hack News Home list method Shows SmartY Variables List

HACK multi-sets of XOOPS system: bbchen // - two files header.php and footer.php .-- // at the root of changes were found

$ XOOOPSTPL-> Display ($ XOOPSCONFIG ['Theme_Set']. '/ theme.html'); replacement to:

IF (Empty ($ XOOPSModule) {$ XOOPSTPL-> Display ($ XOOPSCONFIG ['THEME_SET']. '/ theme.html');} else {$ modthemesel = $ xoopsmodule-> getvar ('DIRNAME'); Switch ( $ MODTHEMESEL) {CASE "newbb": $ XOOOPSTPL-> Display ($ XOOOPSCONFIG ['theme_set']. '/ newbb.html'); Break; Case "News": $ XoopStpl-> Display ($ XOOPSCONFIG ['THEME_SET' ]. '/ news.html'); Break; Default: $ XOOPSTPL-> Display ($ XOOOPSCONFIG ['Theme_Set']. '/ theme.html'); Break;}}

Where the Case "Module Directory Name" in the Switch statement, the corresponding set main file is also a modular name. HTML, so you must create a new model group .html file, then customizable is very strong, Different content arrangements and CSS can be used. Note Header.php and Footer. PHP must be modified.

News Home List Method Shows the first step: Open the modules / news / XOOPS_VERSION.PHP file, find:

// Templates $ modversion ['Templates'] [1] [' file '] =' news_archive.html '; $ modversion [' Templates'] [1] ['Description'] = '; $ modversion [' Templates' ] [2] ['file'] = 'News_Article.html'; $ modversion ['Templates'] [2] [' Description '] =' '; $ modversion [' Templates'] [3] [File '] = 'News_index.html'; $ modversion ['Templates'] [3] [' Description '] =' '; $ modversion [' Templates'] [4] [File '] =' News_Item.html '; $ Modversion ['Templates'] [4] ['Description'] = '';

Add it later

$ modversion ['Templates'] [5] ['file'] = 'News_List.html'; $ modversion ['Templates'] [5] ['Description'] = ''; second step Open Modules / News / Templates / Folder, copy news_item.html and name to news_list.html, use any web editing software editing to delete the content you don't want to display, it is recommended to leave the following (title, date, click, reading)

<{$ story.title}> <{$ story.posttime}> <{$ story.hits}> <{lang_reads}>

But pay attention to the style of this page in CSS, or keep the original style (if you don't know CSS at all, you can also define directly through HTML, but pay attention to unity). The third step update the module and generates a template! When you update the module, when you enter the template, you will find a file news_list.html in the News group, and there is a generated button on the side, click on him to generate a template! The fourth step is selected in the template, "Index.html" click editing, will

<{include file = "db: news_item.html" story = $ stories [i]}>

Change to

<{include file = "db: news_list.html" story = $ stories [i]}>

Then save (if you do not save the button, you are working in the default template, please copy a template and set it to the default template in the system settings and repeat the third step after the third step) fifth step If you already Close the quotation in the system settings:

Update the template for the module. HTML file from the / Themes / YourTheme / Templates directory. HTML file?

You need to empty the file in the primary / Templates_c folder, otherwise it will be avoided. OK completes HACK

Smarty Variable List SmartY Variables is the official XOOPS Smarty variable, check and update this, change or increase when Xoops 2 changes variables. Theme variable

转载请注明原文地址:https://www.9cbs.com/read-60307.html

New Post(0)