1
wishcraft
doing au.labs.coop or marrickiville.au.labs.coop or new-york.us.labs.coop all with places.labs.coop

This is done with the System Preloader places.php

/**
 * System Preloads
 *
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright   The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license     GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @author          Cointin Maxime (AKA Kraven30)
 * @author          Andricq Nicolas (AKA MusS)
 * @version         $Id: core.php 12537 2014-05-19 14:19:33Z beckmi $
 */

// defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined');

if (!function_exists("getBaseDomain")) {
    
/**
     * getBaseDomain
     *
     * @param string $url
     * @return string|unknown
     */
    
function getBaseDomain($url)
    {

        static 
$fallout$stratauris$classes;

        if (empty(
$classes))
        {
            if (empty(
$stratauris)) {
                
$stratauris cleanWhitespaces(file(XOOPS_ROOT_PATH  DIRECTORY_SEPARATOR .  "data" DIRECTORY_SEPARATOR "stratas.diz"));
                
shuffle($stratauris); shuffle($stratauris); shuffle($stratauris); shuffle($stratauris);
            }
            
shuffle($stratauris);
            
$attempts 0;
            while(empty(
$classes) || $attempts <= (count($stratauris) * 1.65))
            {
                
$attempts++;
                
$classes array_keys(unserialize(getURIData($stratauris[mt_rand(0count($stratauris)-1)] ."/v1/strata/serial.api"120120)));
            }
        }
        if (empty(
$fallout))
        {
            if (empty(
$stratauris)) {
                
$stratauris cleanWhitespaces(file(XOOPS_ROOT_PATH  DIRECTORY_SEPARATOR .  "data" DIRECTORY_SEPARATOR "stratas.diz"));
                
shuffle($stratauris); shuffle($stratauris); shuffle($stratauris); shuffle($stratauris);
            }
            
shuffle($stratauris);
            
$attempts 0;
            while(empty(
$fallout) || $attempts <= (count($stratauris) * 1.65))
            {
                
$attempts++;
                
$fallout array_keys(unserialize(getURIData($stratauris[mt_rand(0count($stratauris)-1)] ."/v1/fallout/serial.api"120120)));
            }
        }

        
// Get Full Hostname
        
$url strtolower($url);
        
$hostname parse_url($urlPHP_URL_HOST);
        if (!
filter_var($hostnameFILTER_VALIDATE_IPFILTER_FLAG_IPV6 || FILTER_FLAG_IPV4) === false)
            return 
$hostname;

            
// break up domain, reverse
            
$elements explode('.'$hostname);
            
$elements array_reverse($elements);

            
// Returns Base Domain
            
if (in_array($elements[0], $classes))
                return 
$elements[1] . '.' $elements[0];
                elseif (
in_array($elements[0], $fallout) && in_array($elements[1], $classes))
                return 
$elements[2] . '.' $elements[1] . '.' $elements[0];
                elseif (
in_array($elements[0], $fallout))
                return  
$elements[1] . '.' $elements[0];
                else
                    return  
$elements[1] . '.' $elements[0];
    }
}


if (!
function_exists("getURIData")) {

    
/* function getURIData()
     *
     *     cURL Routine
     * @author         Simon Roberts (Chronolabs) simon@labs.coop
     *
     * @return         float()
     */
    
function getURIData($uri ''$timeout 65$connectout 65$post_data = array())
    {
        
addTimeLimit($timeout+$connectout);
        if (!
function_exists("curl_init"))
        {
            return 
file_get_contents($uri);
        }
        if (!
$btt curl_init($uri)) {
            return 
false;
        }
        
curl_setopt($bttCURLOPT_HEADER0);
        
curl_setopt($bttCURLOPT_POST, (count($posts)==0?false:true));
        if (
count($posts)!=0)
            
curl_setopt($bttCURLOPT_POSTFIELDShttp_build_query($post_data));
            
curl_setopt($bttCURLOPT_CONNECTTIMEOUT$connectout);
            
curl_setopt($bttCURLOPT_TIMEOUT$timeout);
            
curl_setopt($bttCURLOPT_RETURNTRANSFERtrue);
            
curl_setopt($bttCURLOPT_VERBOSEfalse);
            
curl_setopt($bttCURLOPT_SSL_VERIFYHOSTfalse);
            
curl_setopt($bttCURLOPT_SSL_VERIFYPEERfalse);
            
$data curl_exec($btt);
            
curl_close($btt);
            return 
$data;
    }
}


if (!
function_exists("addTimeLimit")) {
    
/**
     *
     * @param array $array
     */
    
function addTimeLimit($seconds 30)
    {
        static 
$timelimit 30;
        
$timelimit .+ $seconds;
        
set_time_limit($timelimit);
    }
}


if (!
function_exists("cleanWhitespaces")) {
    
/**
     *
     * @param array $array
     */
    
function cleanWhitespaces($array = array())
    {
        foreach(
$array as $key => $value)
        {
            if (
is_array($value))
                
$array[$key] = cleanWhitespaces($value);
                else {
                    
$array[$key] = trim(str_replace(array("n""r""t"), ""$value));
                }
        }
        return 
$array;
    }
}


if (!
function_exists("writeRawFile")) {
    
/**
     *
     * @param string $file
     * @param string $data
     */
    
function writeRawFile($file ''$data '')
    {
        
$lineBreak "n";
        if (
substr(PHP_OS03) == 'WIN') {
            
$lineBreak "rn";
        }
        if (!
is_dir(dirname($file)))
            if (
strpos(' '.$fileENTITIES_CACHE))
                
mkdirSecure(dirname($file), 0777true);
                else
                    
mkdir(dirname($file), 0777true);
                    elseif (
strpos(' '.$fileENTITIES_CACHE) && !file_exists(ENTITIES_CACHE DIRECTORY_SEPARATOR '.htaccess'))
                    
writeRawFile(ENTITIES_CACHE DIRECTORY_SEPARATOR '.htaccess'"^.*$">ntdeny from alln");
                    if (
is_file($file))
                        
unlink($file);
                        
$data str_replace("n"$lineBreak$data);
                        
$ff fopen($file'w');
                        
fwrite($ff$datastrlen($data));
                        
fclose($ff);
    }
}
/**
 * Class SystemCorePreload
 */
class SystemPlacesPreload extends XoopsPreloadItem
{
    
/**
     * @param $args
     */
    
function eventCoreIncludeCommonEnd($args)
    {
        if (empty(
$stratauris)) {
            
$placesuris cleanWhitespaces(file(XOOPS_ROOT_PATH  DIRECTORY_SEPARATOR .  "data" DIRECTORY_SEPARATOR "places.diz"));
            
shuffle($placesuris); shuffle($placesuris); shuffle($placesuris); shuffle($placesuris);
        }
        
shuffle($stratauris);
        
xoops_load("XoopsCache");
        if (!isset(
$_SESSION['countries']) || empty($_SESSION['countries']))
        {
            if (!
$countries XoopsCache::read("places_api_countries"))
                
XoopsCache::write("places_api_countries"$countries json_decode(getURIData($placesuris[mt_rand(0count($placesuris)-1)] . '/v1/list/list/json.api'220220), true), 3600 *24 28 2.3);
            if (isset(
$countries['countries']) && !empty($countries['countries']))
            {
                
$_SESSION['countries'] = $countries['countries'];
                
$_SESSION['tlds'] = array();
                foreach(
$countries['countries'] as $country => $values)
                    if (!empty(
$values['TLD']))
                        
$_SESSION['tlds'][str_replace("."""$values['TLD'])] = $values;
            }
        }
        
        
define("XOOPS_HOSTNAME"getBaseDomain(XOOPS_URL));
        
$parts explode(":"str_replace(XOOPS_PROT""XOOPS_URL));
        
$hostname $parts[0];
        if (
$hostname != XOOPS_HOSTNAME)
        {
            
$parts explode("."str_replace(".".XOOPS_HOSTNAME""$hostname));
            
$tld $parts[count($parts)-1];
            unset(
$parts[count($parts)-1]);
            
$place $parts[count($parts)-1];
            if (!isset(
$_SESSION['keys']['places']['tlds'][$tld]) || empty($_SESSION['keys']['places']['tlds'][$tld]))
            {
                
$_SESSION['keys']['places']['tlds'][$tld] = $_SESSION['tlds'][$tld]['key']; 
            } 
            if (isset(
$_SESSION['tlds'][$tld]['key']))
            {
                
define('XOOPS_COUNTRY_KEY'$_SESSION['tlds'][$tld]['key']);
                
define('XOOPS_COUNTRY_NAME'$_SESSION['tlds'][$tld]['Country']);
                
define('XOOPS_COUNTRY_SUBDOMAIN'$tld);
            }
            if (
defined("XOOPS_COUNTRY_KEY") && !empty($place) > 0)
            {
                if (!isset(
$_SESSION['keys']['places']['place'][$place]) && empty($_SESSION['keys']['places']['place'][$place]))
                {
                    
$plae json_decode(getURIData($placesuris[mt_rand(0count($placesuris)-1)] . '/v1/'.XOOPS_COUNTRY_NAME.'/'.str_replace('-'' '$place). '/json.api'220220), true);
                    if (!empty(
$plae))
                        
$_SESSION['keys']['places']['place'][$place]['location'] = $plae;
                    if (!
$nearby XoopsCache::read($key "nearby_places_" XOOPS_COUNTRY_SUBDOMAIN "_" .$place))
                        
XoopsCache::write($key$nearby json_decode(getURIData($placesuris[mt_rand(0count($placesuris)-1)] . '/v1/key/'.$plae['place']['key'].'/' XOOPS_RADIUS_KMS '/json.api'220220), true), 3600 24 mt_rand(1.2343.765));
                    if (!empty(
$nearby['results']['nearby']))
                        
$_SESSION['keys']['places']['place'][$place]['nearby'] = $nearby['results']['nearby'];
                }
                if (isset(
$_SESSION['keys']['places']['place'][$place]) && !empty($_SESSION['keys']['places']['place'][$place]))
                {
                    
define('XOOPS_PLACE_KEY'$_SESSION['keys']['places']['place'][$place]['location']['place']['key']);
                    
define('XOOPS_PLACE_NAME'$_SESSION['keys']['places']['place'][$place]['location']['place']['RegionName']);
                    
define('XOOPS_PLACE_SUBDOMAIN'strtolower(str_replace(" ""-"$_SESSION['keys']['places']['place'][$place]['location']['place']['RegionName'])));
                    
$nearbysubs $nearbykeys $nearbynames = array();
                    if (!empty(
$_SESSION['keys']['places']['place'][$place]['nearby']))
                        foreach(
$_SESSION['keys']['places']['place'][$place]['nearby']['places'] as $country => $values)
                            foreach(
$values as $key => $place)
                            {
                                
$nearbykeys[$key] = $key;
                                
$nearbysubs[$key] = strtolower(str_replace(" ""-"$place['RegionName']));
                                
$nearbynames[$key] = $place['RegionName'];
                            }
                    
define('XOOPS_NEARBY_KEYS'implode(','$nearbykeys));
                    
define('XOOPS_NEARBY_NAMES'implode(','$nearbynames));
                    
define('XOOPS_NEARBY_SUBDOMAINS'implode(','$nearbysubs));
                }
            }        
        }
    }
}


You also have to adjust the mainfile.php line 43:

// XOOPS Virtual Path (URL)
    // Virtual path to your main XOOPS directory WITHOUT trailing slash
    // Example: define('XOOPS_URL', 'http://alluringwhores.com:8080');
    
define('XOOPS_URL'XOOPS_PROT.$_SERVER["HTTP_HOST"]);


You can then alter your theme.html from your theme where evere the tag is called to something like:-<br><br><div class="xoopsCode"><code><span style="color: #000000"> <span style="color: #0000BB"></span><span style="color: #007700"><</span><span style="color: #0000BB">title</span><span style="color: #007700">><{if </span><span style="color: #0000BB">defined</span><span style="color: #007700">(</span><span style="color: #DD0000">'XOOPS_PLACE_NAME'</span><span style="color: #007700">) }><{</span><span style="color: #0000BB">$smarty</span><span style="color: #007700">.const.</span><span style="color: #0000BB">XOOPS_PLACE_NAME</span><span style="color: #007700">}> :: <{/if}><{if </span><span style="color: #0000BB">$xoops_pagetitle </span><span style="color: #007700">!=</span><span style="color: #DD0000">''</span><span style="color: #007700">}><{</span><span style="color: #0000BB">$xoops_pagetitle</span><span style="color: #007700">}> :: <{/if}><{</span><span style="color: #0000BB">$xoops_sitename</span><span style="color: #007700">}><{if </span><span style="color: #0000BB">defined</span><span style="color: #007700">(</span><span style="color: #DD0000">'XOOPS_COUNTRY_NAME'</span><span style="color: #007700">) }> ::: <{</span><span style="color: #0000BB">$smarty</span><span style="color: #007700">.const.</span><span style="color: #0000BB">XOOPS_COUNTRY_NAME</span><span style="color: #007700">}><{/if}></</span><span style="color: #0000BB">title</span><span style="color: #007700">></span><span style="color: #0000BB"></span> </span> </code></div><br><br>And make various alterations around the system due to the accurate places data. </div> <div style="position: relative; bottom:0px; right: 15px; padding-top: 15px; text-align: right; clear: both"> <a class="btn btn-success btn-xs" href="#top" title="Top"><i class="far fa-arrow-alt-circle-up"></i></a> </div> </div> <hr> </div> </div> <style> .kapla { background: #f6f7fb; padding: 10px; border-radius: 3px; border: 1px solid #e3ebf6; } </style> <div class="newbb-viewtopic-footer"> <div class="row mb10"> <div class="col-sm-6 col-md-6 hidden-xs"> <a href="https://xoops.org/modules/newbb/reply.php?topic_id=77036" title="Reply" class="btn btn-sm btn-primary">Reply</a> <a href="https://xoops.org/user.php" title="Register" class="btn btn-sm btn-success">Register</a> <a href="https://xoops.org/modules/newbb/polls.php?op=add&topic_id=77036" title="Add Poll" class="btn btn-sm btn-info">Add Poll</a> </div> </div> <div class="text-right generic-pagination"> </div> </div> <!-- .newbb-viewtopic-footer --> </div> <!-- .newbb-viewforum --> <!-- End content module --> </div> </div> <div class="col-xl-3 col-lg-12 col-md-12"> <!-- Start right blocks loop --> <div class="card"> <div class="card-header"> <h3 class="card-title">Login</h3> </div> <div class="card-body p-0"> <div class="card-body pt-3 pb-3"> <div class="panel panel-default"> <form action="https://xoops.org/user.php" method="post" role="form"> <div class="panel-body"> <form class="form-horizontal" role="form"> <div class="form-group"> <label for="inputEmail3" class="col-sm-12 control-label"> Username</label> <div class="col-sm-9"> <input class="form-control login-block-form" style="margin-bottom: 5px;" type="text" name="uname" placeholder="Your Username"> </div> </div> <div class="form-group"> <label for="inputPassword3" class="col-sm-12 control-label"> Password</label> <div class="col-sm-9"> <input class="form-control login-block-form" type="password" name="pass" placeholder="Your Password"> </div> </div> <div class="form-group"> <div class="col-sm-offset-3 col-sm-9"> <div class="checkbox"> <label> <input type="checkbox" name="rememberme" value="On" class="formButton"> Remember me </label> </div> </div> </div> <input type="hidden" name="xoops_redirect" value="/modules/newbb/viewtopic.php?post_id=359757"> <input type="hidden" name="op" value="login"> <div class="form-group last"> <div class="col-sm-offset-3 col-sm-9"> <input type="submit" class="btn btn-success btn-sm" value="User Login"> <button type="reset" class="btn btn-default btn-sm"> Reset </button> </div> </div> </form> </div> </form> <div class="panel-footer" style="text-align: center"> <a href="https://xoops.org/register.php" title="Register now!">Register now!</a>  |  <a href="https://xoops.org/user.php#lost" title="Lost Password?">Lost Password?</a> </div> </div> </div> </div> </div> <div class="card"> <div class="card-header"> <h3 class="card-title">Search</h3> </div> <div class="card-body p-0"> <div class="card-body pt-3 pb-3"> <form role="search" action="https://xoops.org/search.php" method="get"> <div class="input-group"> <input class="form-control" type="text" name="query" placeholder="Search here..."> <input type="hidden" name="action" value="results"> <span class="input-group-btn"> <button class="btn btn-primary" type="submit"> <span class="fas fa-search"></span> </button> </span> </div> </form> <p class="text-right"> <a href="https://xoops.org/search.php" title="Advanced Search"> Advanced Search </a> </p> </div> </div> </div> <div class="card"> <div class="card-header"> <h3 class="card-title">Recent Posts</h3> </div> <div class="card-body p-0"> <div class="job-box"> <div class="inbox-message"> <ul> <li> <div class="message-body1"> <div class="message-body-heading1"> <h5><a href="https://xoops.org/modules/newbb/viewtopic.php?post_id=367252#forumpost367252"><i class="fas fa-angle-right"></i> PHP 8.4.0 Alpha 1 released</a></h5> </div> <div class="olc"><i class="far fa-calendar-alt"></i> 7/10 6:19 <i class="fas fa-user"></i> <a href="https://xoops.org/userinfo.php?uid=19563" title="Mamba">Mamba</a> </div> </div> </li> <li> <div class="message-body1"> <div class="message-body-heading1"> <h5><a href="https://xoops.org/modules/newbb/viewtopic.php?post_id=367251#forumpost367251"><i class="fas fa-angle-right"></i> Overview of the Composer packages in Admin</a></h5> </div> <div class="olc"><i class="far fa-calendar-alt"></i> 7/10 6:15 <i class="fas fa-user"></i> <a href="https://xoops.org/userinfo.php?uid=19563" title="Mamba">Mamba</a> </div> </div> </li> <li> <div class="message-body1"> <div class="message-body-heading1"> <h5><a href="https://xoops.org/modules/newbb/viewtopic.php?post_id=367243#forumpost367243"><i class="fas fa-angle-right"></i> Re: xoops_getBaseDomain</a></h5> </div> <div class="olc"><i class="far fa-calendar-alt"></i> 6/29 6:13 <i class="fas fa-user"></i> <a href="https://xoops.org/userinfo.php?uid=19563" title="Mamba">Mamba</a> </div> </div> </li> <li> <div class="message-body1"> <div class="message-body-heading1"> <h5><a href="https://xoops.org/modules/newbb/viewtopic.php?post_id=367242#forumpost367242"><i class="fas fa-angle-right"></i> xoops_getBaseDomain</a></h5> </div> <div class="olc"><i class="far fa-calendar-alt"></i> 6/27 22:55 <i class="fas fa-user"></i> <a href="https://xoops.org/userinfo.php?uid=74855" title="mbu10">mbu10</a> </div> </div> </li> <li> <div class="message-body1"> <div class="message-body-heading1"> <h5><a href="https://xoops.org/modules/newbb/viewtopic.php?post_id=367240#forumpost367240"><i class="fas fa-angle-right"></i> Re: Test 3</a></h5> </div> <div class="olc"><i class="far fa-calendar-alt"></i> 6/10 1:12 <i class="fas fa-user"></i> <a href="https://xoops.org/userinfo.php?uid=72918" title="bushir">bushir</a> </div> </div> </li> <li> <div class="message-body1"> <div class="message-body-heading1"> <h5><a href="https://xoops.org/modules/newbb/viewtopic.php?post_id=367239#forumpost367239"><i class="fas fa-angle-right"></i> Test 3</a></h5> </div> <div class="olc"><i class="far fa-calendar-alt"></i> 6/10 1:08 <i class="fas fa-user"></i> <a href="https://xoops.org/userinfo.php?uid=72918" title="bushir">bushir</a> </div> </div> </li> <li> <div class="message-body1"> <div class="message-body-heading1"> <h5><a href="https://xoops.org/modules/newbb/viewtopic.php?post_id=367238#forumpost367238"><i class="fas fa-angle-right"></i> Re: Test2</a></h5> </div> <div class="olc"><i class="far fa-calendar-alt"></i> 6/9 21:56 <i class="fas fa-user"></i> <a href="https://xoops.org/userinfo.php?uid=72918" title="bushir">bushir</a> </div> </div> </li> <li> <div class="message-body1"> <div class="message-body-heading1"> <h5><a href="https://xoops.org/modules/newbb/viewtopic.php?post_id=367237#forumpost367237"><i class="fas fa-angle-right"></i> Re: Test2</a></h5> </div> <div class="olc"><i class="far fa-calendar-alt"></i> 6/9 21:29 <i class="fas fa-user"></i> <a href="https://xoops.org/userinfo.php?uid=72918" title="bushir">bushir</a> </div> </div> </li> <li> <div class="message-body1"> <div class="message-body-heading1"> <h5><a href="https://xoops.org/modules/newbb/viewtopic.php?post_id=367236#forumpost367236"><i class="fas fa-angle-right"></i> Re: Test2</a></h5> </div> <div class="olc"><i class="far fa-calendar-alt"></i> 6/9 21:25 <i class="fas fa-user"></i> <a href="https://xoops.org/userinfo.php?uid=19563" title="Mamba">Mamba</a> </div> </div> </li> <li> <div class="message-body1"> <div class="message-body-heading1"> <h5><a href="https://xoops.org/modules/newbb/viewtopic.php?post_id=367235#forumpost367235"><i class="fas fa-angle-right"></i> Test2</a></h5> </div> <div class="olc"><i class="far fa-calendar-alt"></i> 6/9 19:34 <i class="fas fa-user"></i> <a href="https://xoops.org/userinfo.php?uid=19563" title="Mamba">Mamba</a> </div> </div> </li> </ul> </div> </div> </div> </div> <div class="card"> <div class="card-header"> <h3 class="card-title">Who's Online</h3> </div> <div class="card-body p-0"> <div class="card-body pt-3 pb-3"> <p><strong>1028</strong> user(s) are online (<strong>301</strong> user(s) are browsing <strong>Support Forums</strong>)</p> <hr> <p><i class="fas fa-user-plus"></i> Members: 0</p> <hr> <p><i class="fas fa-street-view"></i> Guests: 1028</p> <hr> <p><i class="fas fa-users"></i> </p> <a class="btn btn-sm btn-info" href="javascript:openWithSelfMain('https://xoops.org/misc.php?action=showpopups&type=online','Online',420,350);" title="more...">more...</a> </div> </div> </div> <div class="card"> <div class="card-header"> <h3 class="card-title">Donat-O-Meter</h3> </div> <div class="card-body p-0"> <table class="table table-bordered"> <tr> <td style="width: 100%; font-weight: bold; text-decoration: underline;" colspan="2">Stats</td> </tr> <tr> <td>Goal:</td> <td>$100.00</td> </tr> <tr> <td>Due Date:</td> <td>Jul 31</td> </tr> <tr> <td>Gross Amount:</td> <td>$0.00</td> </tr> <tr> <td>Net Balance:</td> <td>$0.00</td> </tr> <tr> <td style="font-weight: bold;">Left to go:</td> <td style="font-weight: bold;"><span style="color: #CC0000;">$100.00</span></td> </tr> <tr> <td style="width: 100%; text-align: center;" colspan="2"><a href="https://xoops.org/modules/xdonations/index.php"> <img src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" style="border-width; 0px;" alt="Make donations with PayPal!" width=110 height=23 /> </a></td> </tr> </table> </div> </div> <div class="card"> <div class="card-header"> <h3 class="card-title">Latest GitHub Commits</h3> </div> <div class="card-body p-0"> <div id="demo"> <div class="job-box"> <div class="inbox-message"> <ul> <li v-for="record in commits"> <div class="message-body1"> <div class="message-body-heading1"> <h5><a><i class="fas fa-angle-right"></i></a> <a :href="record.html_url" target="_blank" class="commit">{{ record.sha.slice(0, 7) }} - <span class="message">{{ record.commit.message | truncate }}</span></a></h5> </div> <div class="olc"><i class="fas fa-user"></i> <a :href="record.author.html_url" target="_blank">{{ record.commit.author.name }}</a> <i class="fas fa-folder-open"></i> {{ record.commit.author.date | formatDate }}</div> </div> </li> </ul> </div> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.2.4/vue.min.js"></script> <script> var apiURL = 'https://api.github.com/repos/XOOPS/XoopsCore25/commits?per_page=3&sha=' /** * Actual demo */ var demo = new Vue({ el: '#demo', data: { branches: ['master'], currentBranch: 'master', commits: null }, created: function () { this.fetchData() }, watch: { currentBranch: 'fetchData' }, filters: { truncate: function (v) { var newline = v.indexOf('n') return newline > 0 ? v.slice(0, newline) : v }, formatDate: function (v) { return v.replace(/T|Z/g, ' ') } }, methods: { fetchData: function () { var xhr = new XMLHttpRequest() var self = this xhr.open('GET', apiURL + self.currentBranch) xhr.onload = function () { self.commits = JSON.parse(xhr.responseText) console.log(self.commits[0].html_url) } xhr.send() } } }) </script> </div> </div> <!-- End right blocks loop --> </div> </div> </div> </section> <!--Section--> <!--Footer Section--> <footer class="footer"> <div class="container bottom_border"> <div class="row"> <div class=" col-sm-4 col-md col-6 col"> <h5 class="headin5_amrc col_white_amrc pt2">About us</h5> <!--headin5_amrc--> <ul class="footer_ul_amrc"> <li><a href="https://xoops.org/modules/wfchannel/">About Xoops</a></li> <li><a href="https://xoops.org/modules/wfchannel/index.php?cid=24">Why XOOPS?</a></li> <li><a href="https://xoops.org/modules/wfchannel/index.php?cid=21">Board of Advisors</a></li> <li><a href="https://xoops.org/modules/wgtimelines/index.php?op=list&tl_id=1">Xoops Innovators</a></li> <li><a href="https://xoops.org/modules/wgtimelines/index.php?op=list&tl_id=2">XOOPSers</a></li> <li><a href="https://xoops.org/modules/wfchannel/index.php?cid=6">XOOPS Etiquette</a></li> </ul> <!--footer_ul_amrc ends here--> </div> <div class=" col-sm-4 col-md col-6 col"> <h5 class="headin5_amrc col_white_amrc pt2">Learn</h5> <!--headin5_amrc--> <ul class="footer_ul_amrc"> <li><a href="https://xoops.org/modules/news/article.php?storyid=4534">Books</a></li> <li><a href="https://xoops.org/modules/smartfaq/">FAQ</a></li> <li><a href="https://www.gitbook.com/@xoops/">Core Guides</a></li> <li><a href="https://www.gitbook.com/@xoops/">Module Guides</a></li> </ul> <!--footer_ul_amrc ends here--> </div> <div class=" col-sm-4 col-md col-6 col"> <h5 class="headin5_amrc col_white_amrc pt2">Use</h5> <!--headin5_amrc--> <ul class="footer_ul_amrc"> <li><a href="https://github.com/XOOPS/XoopsCore25/releases">Download Xoops</a></li> <li><a href="https://github.com/XoopsModules25x">Module @ GitHub</a></li> <li><a href="https://github.com/Xoopsthemes">Themes@ GitHub</a></li> <li><a href="https://github.com/XoopsLanguages">Languages @ GitHub</a></li> <li><a href="https://xoops.org/modules/newbb/">Support Forums</a></li> <li><a href="https://xoops.org/modules/xoopspartners/">International Support</a></li> </ul> <!--footer_ul_amrc ends here--> </div> <div class=" col-sm-4 col-md col-6 col"> <h5 class="headin5_amrc col_white_amrc pt2">Develop GitHub</h5> <!--headin5_amrc--> <ul class="footer_ul_amrc"> <li><a href="https://github.com/XOOPS">Core @ GitHub</a></li> <li><a href="https://github.com/XoopsModules25x">Module @ GitHub</a></li> <li><a href="https://github.com/Xoopsthemes">Themes@ GitHub</a></li> <li><a href="https://github.com/XoopsLanguages">Languages @ GitHub</a></li> <li><a href="https://sourceforge.net/projects/xoops/">Legacy XOOPS @ SourceForge </a></li> <li><a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md">Coding Standards PSR-2</a></li> </ul> <!--footer_ul_amrc ends here--> </div> <div class=" col-sm-4 col-md col-6 col"> <h5 class="headin5_amrc col_white_amrc pt2">Contribute</h5> <!--headin5_amrc--> <ul class="footer_ul_amrc"> <li><a href="https://xoops.org/modules/xdonations/">$$$ Donations</a></li> <li><a href="https://github.com/orgs/XOOPS/people">Join Team</a></li> <li><a href="https://github.com/XOOPS">Core @ GitHub</a></li> <li><a href="https://github.com/XoopsModules25x">Module @ GitHub</a></li> <li><a href="https://github.com/Xoopsthemes">Themes@ GitHub</a></li> <li><a href="https://github.com/XoopsLanguages">Languages @ GitHub</a></li> <li><a href="https://github.com/XOOPS/XoopsCore25/issues">Report Core Bug</a></li> </ul> <!--footer_ul_amrc ends here--> </div> <div class=" col-sm-4 col-md col-6 col"> <h5 class="headin5_amrc col_white_amrc pt2">Connect</h5> <!--headin5_amrc--> <ul class="footer_ul_amrc"> <li><a href="https://www.facebook.com/groups/xoops/">Facebook</a></li> <li><a href="http://www.linkedin.com/groups?gid=43552">LinkedIn</a></li> <li><a href="http://www.flickr.com/photos/tags/xoops/">Flickr</a></li> <li><a href="https://www.youtube.com/results?search_query=xoops">YouTube</a></li> <li><a href="https://www.openhub.net/p/xoops">Ohloh</a></li> <li><a href="https://twitter.com/xoopsgithub">Twitter</a></li> </ul> <!--footer_ul_amrc ends here--> </div> </div> </div> <div class="container"> <!--foote_bottom_ul_amrc ends here--> <br> <p class="text-center"><a rel="nofollow" href="https://xoops.org/modules/wfchannel/index.php?pagenum=3">Terms of Use</a> | <a rel="nofollow" href="https://xoops.org/modules/wfchannel/index.php?pagenum=4">Privacy Policy</a> | Hosted by <a rel="nofollow" href="http://www.arvixe.com/xoops_hosting?utm_campaign=xoops&utm_medium=banner&utm_source=xoops.org" title="Hosted by Arvixe">Arvixe Hosting</a> | <a rel="nofollow" href="https://xoops.org/backend.php" title="RSS2 Feed"><img src="https://xoops.org/uploads/rss.gif" alt="RSS 2.0 Button" /></a> <script type="module"> jQuery(document).ready(function () { jQuery("ul.sf-menu").superfish(); pathClass: "current" }); </script></p> </div> <center><a href="https://erenyumak.com/" target="_blank">Design: B.Heyula</a></center> </footer> <a href="#top" id="back-to-top" style="display: inline;"><i class="fa fa-long-arrow-up"></i></a> <!--Footer Section--> <!-- JS --> <script src="https://xoops.org/themes/xoops2020/js/jquery-3.5.1.min.js"></script> <script src="https://xoops.org/themes/xoops2020/js/bootstrap.min.js"></script> <script src="https://xoops.org/themes/xoops2020/js/bootstrap.bundle.min.js"></script> <script src="https://xoops.org/themes/xoops2020/js/newapplication.js" defer></script> <!-- JS --> </body> </html>