I very liked this mod and want to use it in my gallery. So I added support for comments (stored in files, it's was important for me) and very simply admin panel and I would like to share it with you.
Just some notes before:
1. I don't have php knowledge, so will be good if someone can check the code.
2. I could make spelling mistakes in English.
(Sorry)
3. The templates are based on default style.
3. Make backup before modifications.
------------------- INSTALLATION -----------------------1. Download the attachment from this message.
- upload the file articles.php to root directory of gallery
- the file add_edit_articles.php to folder admin/plugins
- the html files to your template directory
2. In the file
global.php find:
elseif (preg_match("/categories.php/", $self_url) && !preg_match("/[?|&]".URL_CAT_ID."=[^?|&]*/", $self_url)) {
$self_url .= "?".URL_CAT_ID."=".$cat_id;
}
add
below this code:
elseif (preg_match("/articles.php/", $self_url) && !preg_match("/[?|&]".URL_ID."=[^?|&]*/", $self_url) && $id) {
$self_url .= "?".URL_ID."=".$id;
}
3. In the file
includes/page_header.php find:
"url_top_images" => $site_sess->url(ROOT_PATH."top.php"),
add
below this:
"url_articles" => $site_sess->url(ROOT_PATH."articles.php"),
"lang_articles" => $lang['articles'],
4. In the file
your language/main.php just before
?> add:
// --------------- MOD for articles publishing --------------
$lang['articles'] = "Articles";
$lang['edit_article'] = "Edit article";
$lang['total_comments'] = "Total comments: ";
5. In the file
home.html use this link to your articles
<a href="{url_articles}">{lang_articles}</a>
---------------- END INSTALLATION ------------------Now you can go in your gallery to articles page and click
Edit articleor in admin panel you can find in the left link
add_edit_articles in PlugIns menu.
Some important things:
1. You must put article's title between <!-->. For example: <span class="title">
<!-->Article title<!--></span>
2. Don't write <span class="title"><!-->{lang_articles}<!--></span> in the
articles.html file,
put it in the file
articles/index.html3. You can find more notes in control panel of mod.
If your liked this, ENJOY!