Jump to content
LemmeCheck.Info

Gallery Export [Code Inside]


TPub
 Share

Recommended Posts

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

Edited by TPub
Link to comment
Share on other sites

  • 3 months later...

Hello TPub, i have managed to import galleries but there is a problem to import preview thumbnails from arylia, the url is correct, the preview thumbnail on arylia has the same size on tgpx (199x264) and it does not import correctly, i have to manual crop each thumb from gallery, i have selected the "Preview URL" in import tool for the url of arylia preview thumbs, can you help me out please?

 

thank you,

Sam

Link to comment
Share on other sites

  • 1 month later...

Hi Sam, sorry, just now seeing your message.

Did you figure this out? If the thumbnail url works in your browser, the problem might be how tgpx import thumbs. Never used tgpx so I don't know how it works.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. policies