Pandao CMS pro - 3.7.0 (Dec 15, 2016)
Replace the following files and execute the queries in your SQL manager to perform the updates.
NEW FEATURES/IMPROVEMENTS
New navigation management (new module Menu)
/admin/modules/menu/
/admin/modules/page/config.xml
/index.php
/common/db.sql
>> New table pm_menu
CREATE TABLE IF NOT EXISTS pm_menu( id int NOT NULL AUTO_INCREMENT, lang int NOT NULL, name varchar(50), title varchar(250), id_parent int, item_type varchar(30), id_item int, url text, main int DEFAULT 1, footer int DEFAULT 0, checked int DEFAULT 0, rank int DEFAULT 0, PRIMARY KEY(id, lang) ) ENGINE=INNODB DEFAULT CHARSET=utf8; ALTER TABLE pm_menu ADD CONSTRAINT menu_lang_fkey FOREIGN KEY (lang) REFERENCES pm_lang(id) ON DELETE CASCADE ON UPDATE NO ACTION;
>> Copy the following PHP script (add the opening php tag at the beginning) in a new file (e.g. update.php) in the root of your website (beside index.php) and execute the script (e.g. in your browser: http//www.mywebsite.tld/update.php), then remove the file:
require("common/lib.php"); require("common/define.php"); $i = 0; $result = $db->query("SELECT * FROM pm_page WHERE footer = 1 OR main = 1 OR id_parent IN(SELECT id FROM pm_page WHERE main = 1) ORDER BY id, lang"); if($result !== false){ foreach($result as $row){ $data = array(); $data['id'] = $row['id']; $data['lang'] = $row['lang']; $data['name'] = $row['name']; $data['title'] = $row['title']; $data['id_parent'] = ($row['id_parent'] == 0) ? null : $row['id_parent']; $data['item_type'] = "page"; $data['id_item'] = $row['id']; $data['main'] = (empty($row['footer']) && empty($row['main'])) ? 1 : $row['main']; $data['footer'] = $row['footer']; $data['checked'] = $row['checked']; $data['rank'] = $row['rank']; $result_insert = db_prepareInsert($db, "pm_menu", $data); if($result_insert !== false){ if($result_insert->execute() !== false) $i++; } } } echo "$i menu items successfully inserted!"; $i = 0; $n = 0; $id = 0; $result = $db->query("SELECT * FROM pm_widget WHERE pos = 'footer' ORDER BY rank, id"); if($result !== false){ foreach($result as $row){ if($id != $row['id']){ $id = $row['id']; $n++; } if($n > 3) $n = 3; $data = array(); $data['id'] = $row['id']; $data['pos'] = "footer_col_".$n; $result_update = db_prepareUpdate($db, "pm_widget", $data); if($result_update !== false){ if($result_update->execute() !== false) $i++; } } } echo "$i widgets successfully updated!";
/common/lib.php
/templates/default/common/header.php
/templates/default/models/article.php
/templates/default/models/gallery.php
/templates/default/models/sitemap.php (articles no longer displayed here)
Possibility to add multiple widgets / column in the footer
/admin/modules/widgets/config.xml
/templates/default/css/layout.css
>> WIDGETS block
/templates/default/common/footer.php
/templates/default/models/page.php
New module Social (social network links)
/admin/modules/social/
/common/db.sql
>> New table pm_social:
CREATE TABLE IF NOT EXISTS pm_social( id int NOT NULL AUTO_INCREMENT, type varchar(50), url text, checked int DEFAULT 1, rank int DEFAULT 0, PRIMARY KEY(id) ) ENGINE=INNODB DEFAULT CHARSET=utf8;
/templates/default/common/header.php
FIXED ISSUES
String truncation issue with HTML tags in the listings of the admin panel
/common/lib.php
Error parsing translation file of the admin panel
/common/define.php
RTL support for phone and email icons (preheader)
/templates/default/common/header.php
Log out from admin panel if user type is "registered"
/common/define.php
/admin/index.php
/admin/setup.php
/admin/login.php
/admin/settings.php
/admin/modules/default/common.php