Search the Community
Showing results for tags 'php'.
-
This will add links to export galleries from inside Arylia. *Make A Back Up Of File Before You Edit It* Create a file named exportGalleries.php and place this code inside. Fill in SQL details so it can fetch tables <?php //---------------------------------- // Arylia Gallery Export // // //---------------------------------- //SQL database configuration -> enter your details $db_host = ""; $db_user = ""; $db_pass = ""; $db_db = ""; //Arylia SQL database tables. These are the defaults, change to match your own. $gal_table = "builder_galleries"; $site_table = "builder_sponsorSites"; //Get sponsor site ID from url $idsite = intval($_GET['siteId']); mysql_connect($db_host, $db_user, $db_pass); mysql_select_db($db_db); //Get every gallery in database if(!$_GET['siteId']) $exportResult = mysql_query("SELECT galleryUrl, galleryName, galleryImages, siteName, description FROM $gal_table,$site_table WHERE $gal_table.siteId=$site_table.siteId ORDER BY siteName, createDate DESC"); //Get every gallery from sponsor site else $exportResult = mysql_query("SELECT galleryUrl, galleryName, galleryImages, siteName, description FROM $gal_table,$site_table WHERE $gal_table.siteId=$idsite AND $site_table.siteId=$idsite ORDER BY siteName, createDate DESC"); //Export galleries site name| while($exportGallery = mysql_fetch_assoc($exportResult)) {?> <?= $exportGallery["siteName"] ?>|http://<?= $_SERVER['HTTP_HOST'], $exportGallery["galleryUrl"] ?>|<?= $exportGallery["galleryName"] ?>|<?php $galdesc = $exportGallery["description"]; $galname = $exportGallery["galleryName"]; if (!empty($galdesc)) { echo $galdesc; } else { echo $galname; } ?>|<?= $_SERVER['HTTP_HOST'], substr($exportGallery["galleryUrl"], 0, strrpos($exportGallery["galleryUrl"], "/")) ?>/thumbs/preview.jpg|<?= $exportGallery["galleryImages"] ?> <br> <?}?> Upload exportGalleries.php to arylia/content folder. While inside arylia/content folder, open sponsorInfo.php and find this code around line 88 *Make A Back Up Of File Before You Edit It* <TD><A HREF="?action=editSite&siteId=<?= $thisSite["siteId"] ?>">Edit</A></TD> place this code right below that line you found <TD><A HREF="/arylia/content/exportGalleries.php?&siteId=<?= $thisSite["siteId"] ?>">Export</A></TD> save sponsorInfo.php Go to manage and click on sponsor name. Each site under that sponsor will have a gallery export link. This is the export format. site name|gallery url|gallery name|gallery description|thumb url|pic count Now this will give you a Export All Galleries link under Galleries tab. Inside Arylia folder, open layout.php and find this array, around line 23 "Galleries" => array( below that you will see a sub menu array. Each line except the last has a comma at the end. Place a comma at the end of the last line. It should be "List Galleries" now place this code below "List Galleries" "Export All Galleries" => "/arylia/content/exportGalleries.php" save layout.php