151
wishcraft
Grrrr.. XOOPS 2.5 and Xortify 4.17

Apologies

During the coding of Xortify 4.16 for XOOPS 2.6 for some reason a couple of XOOPS 2.6 files for Xortify snuck into the XOOPS 2.5 library. This was on two files; so this should be last expected release for XOOPS 2.5.

This must have happened after the testing processes and in the packaging of the modules you can download Xortify 4.17 for XOOPS 2.5 from the following URL:

Download: xoops2.5_xortify_4.17.zip - 1.2Mbs

The following Discussion, Support Ticket and Wiki exist on the Xortify Project:

Forums for Xortify: https://sourceforge.net/p/xortify/discussion/?source=navbar
Support for Xortify: https://sourceforge.net/p/xortify/tickets/?source=navbar
Wiki for Xortify: https://sourceforge.net/p/xortify/wiki/?source=navbar

We are currently working on a version of Xortify called Wortify for WordPress for anyone that uses it!



152
wishcraft
Re: Sexy Mod

Thank you mamba, for the correct response and directly putting them to my sourceforge site.

Notably they where written both modules for XOOPS 2.4 and 2.5, I would be more than happy to help just connect to me on skype wishcraft555 is the username to use and we will take it from there!

Thanks

Simon



153
wishcraft
Re: Extreme Theme for XOOPS 2.5

Hey Cessy,

Haven't heard back cause I would say this is a minor oversight I have to fix.. With the backgrounds.. People ended up cURLing the background.php that loads the background images. I have modified the theme so it has a passkey for the background image to load.

I also found in the background with correct images you would get a back background. So what I have added is the following and change.

Added:

+ theme.html - Changed to add passkey (See below)
* language
| +------ english
| - main.php - contains the encryption salt.
* images
+------- backgrounds
- .htaccess - Has changed
- background.php - Has changed (See below)


changes to background.php
// Added to line 3
include dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR 'language' DIRECTORY_SEPARATOR 'english' DIRECTORY_SEPARATOR 'main.php';

// Line 4
if (isset($_GET['base'])&&isset($_GET['passkey'])&&$_GET['passkey']==sha1($_GET['base'].date('Y-m-d H') . THEME_EXTREME_SALT)) {


// Lines 46 to 61 have changed to include a try{} catch{} as in case a corrupt image is selected, with a while loop until an image passes through WideImage properly
$noloop false;
while (
$noloop==false) {
    
$randomfiles listFolderFiles(dirname(__FILE__));
    foreach(
$randomfiles as $key => $values) {
            if (
is_array($values)) {
            
shuffle($values);
            
$imagekeys array_keys($values);
            
$image $key DIRECTORY_SEPARATOR $values[$imagekeys[mt_rand(0count($imagekeys)-1)]];
            if (
is_file($image) && !is_dir($image))
                continue;
        }
    }    
    try {
        
$img = @WideImage::load($image);
        
$res $img->resize(800600);
        
header("Content-Type""image/jpeg");
        
$res->output('jpg');
        
$noloop true;
    }
    catch (
Exception $e) { $noloop false; }
}

// Line 63 - 65
}
header('HTTP/1.0 404 Not Found');
exit(
0);


Changes to theme.html
//Line 228
images: [<{php}> $n mt_rand(3565); for($r=1$r<=$n$r++) { <{/php}>"<{$xoops_imageurl}>/images/backgrounds/background_<{php}> echo ++$bgi . '_' . sha1($bgi.date('Y-m-d H') . EXTERME_THEME_SALT);<{/php}>.jpg"<{php}>if ($r!=$n) { echo ", ";}  } <{/php}>],


This will secure the background.php with a revolving door to load the image, so people don't hang on it trying to get all the images and slowing it down!

Download xoops25_theme_extreme_v1.02.zip - 5.3Mb's

Remember to change the SALT in /language/english/main.php



154
wishcraft
Keyword SEO Method for Themes

The meta_description tag should be only used when the 'system' module is indexed, otherwise it only indexes the description and not the page, also the keywords should contain keywords in the URL (This is when you are using .htaccess to SEO the URL). And you need to include the apple touch icon's for iOS (iPad, iPhone etc.) when it saves a URL, instead of the desktop having the normal default icon it will have the one you specify.. The following examples should be done, in your theme's like so, this is part of the (Extreme Theme Framework).

Meta Keyword Framework Example

<
meta name="keywords" content="<{php}>

$search = array(' with ', ' and ', ' the ', ' there ', ' their ', ' they're ', ' are ', ' to ', ' when ', ' on ', ' by ', ' you ',' ','.','<','>','"',';',':','}','{','[',']','|','\','/','=','+','-','_',')','(','*','&','^','%','$','#','@','!','~','`');
$minimumwordlen 3;        
// Gets Meta Data
$path str_replace($search','str_replace(basename($_SERVER['REQUEST_URI']), ''$_SERVER['REQUEST_URI']));
$sitename htmlspecialchars_decode($this->_tpl_vars['xoops_sitename']);
$slogon htmlspecialchars_decode($this->_tpl_vars['xoops_slogan']);
$pagetitle htmlspecialchars_decode($this->_tpl_vars['xoops_pagetitle']);
$keywords htmlspecialchars_decode($this->_tpl_vars['xoops_meta_keywords']);
$description htmlspecialchars_decode($this->_tpl_vars['xoops_meta_description']);
$nophrase str_replace($search','$path.str_replace($search','$sitename).','.str_replace($search','$slogon).','.str_replace($search','$pagetitle).','.str_replace($search','$keywords).','.str_replace($search','$description));
$keywords array_unique(explode(','$nophrase));
foreach(
$keywords as $id => $word) {
    if (
strlen($word)<$minimumwordlen||is_numeric($word)) {
        unset(
$keywords[$id]);
    }
}
echo 
implode(', '$keywords);<{/php}>" />


Meta Descriptions Framework Example
<{if $xoops_dirname eq 'system'}>
    <
meta name="description" content="<{$xoops_meta_description}>" />
<{/if}>


Favorite & Apple Touch Icons Framework Example
<link rel="shortcut icon" type="image/ico" href="<{$xoops_url}>/favicon.ico" />
<
link rel="icon" type="image/png" href="<{$xoops_url}>/icon.png" />
<
link rel="apple-touch-icon" href="<{$xoops_url}>/apple-touch-icon-56x56.png">
<
link rel="apple-touch-icon" sizes="72x72" href="<{$xoops_url}>/apple-touch-icon-72x72.png">
<
link rel="apple-touch-icon" sizes="114x114" href="<{$xoops_url}>/apple-touch-icon-114x114.png">



155
wishcraft
Re: Extreme Theme for XOOPS 2.5

Includes

  • SEO Keywords Streamling
  • Description Isolations - System only
  • Apple Touch Icons
  • CSS3 - Shadow, Stroke, Rounded Edges



156
wishcraft
Re: Xforum latest forum posts block ?

I will look into this for you... For Chronolabs Modules just put a request on under 'Hacks and Modifications' and when i have a moment, i will come up with some code for you to run as a PHP block..

The Discussion forum is here :: https://sourceforge.net/p/chronolabs/discussion/



157
wishcraft
Extreme Theme for XOOPS 2.5

Extreme Theme

Well I haven't released a theme before so I thought I should! This is solely not just my work it comprised of a couple of people's work to make this theme! This is being release cause it is GNU2 from aph3x so we have to release further modification as part of OSI and Open Source agreements!

Resized Image


This theme was based on bleekk's framework but was from pulse ( http://www.aphexthemes.com/pulse-theme.html ) by aph3x (Erol) it is responsive and been highly modified for the community.

It includes a cycling background as well as gradients and plenty of CSS3 like for the title which include shadows and stroking. The main body is a gradient which if you want to change you will have to look up "Ultimate Gradient Generator" on google.com and change the CSS in /theme/extreme/css/style.css with the class tag to change which is .mainbody {}.

Cycling Background

This is designed to run on Apache with a .htaccess being included in /theme/extreme/images/backgrounds/ which is for the php file background.php which will search all sub-folders in /theme/extreme/images/backgrounds/ for suitable images and output them at scalar to 800x600 for the wall paper which is jQuery cycling and randomly changing method which is some additional code in the Java-script by wishcraft to have random background shifts.

Downloading & Unpacking

Download: xoops2.5_theme_extreme.zip - 5.3 MB

When you download the zip and unpack it, you will be presented with a folder called 'extreme' this simply drops into the /themes/ path of your XOOPS installation, remember too remove the sample backgrounds /theme/extreme/images/backgrounds/samples/ and replace the 'samples' sub-folder with as many sub-folder however deep with backgrounds and wall papers you want in the background of the module!

Further Media

Remember if you want to listen to some of my influential music tune into http://galactic-conquest.com it has guest access on subsonic, and Xortify (https://xortify.com) has reached the end of it SDLC... Check them out



158
wishcraft
Re: Ultimate Seed with DOM and seeding Feed with XoopsCache

You can speed it up by caching the token for a period of time with the following routine it uses the XoopsCache object to store the token, between one minute and one hour..

/**
 * Function: makeRandomSeeded() - Seeds the Selection Process of Random Sorting & Selection (Using XoopCache to speed up)
 *
 * @param $filename string - Source of Seeding XML
 * @return integer - the seed used
 */
function makeRandomSeeded($filename 'http://seed.feeds.labs.coop/') {
    
error_reporting(E_ERROR);
    
    include_once 
$GLOBALS['xoops']->path('/class/cache/xoopscache.php');
    if (!
$seeds XoopsCache::read('randomisation_seeds_tokens')) {
        
// Loads XML by forcing loadXML with DOM
        
$xml file_get_contents($filename);
        
$doc = new DOMDocument();
        
$doc->loadXML($xml);
    
        
// Parses Description Tag and Remove help and File Descriptor
        
$skip = array('This feed can''Current mode is');
        
$elements $doc->getElementsByTagName('description');
        foreach(
$elements as $element) {
            
$seed $element->nodeValue;
            
$found false;
            foreach(
$skip as $find) {
                if (
substr($seed0strlen($find))==$find) {
                    
$found true;
                }
            }
            if (
$found==false)
                
$seeds[] = $seed;
        }
        
XoopsCache::write('randomisation_seeds_tokens'$seedsmt_rand(603600));
    }
    
    
// Selects Seed from $seeds
    
shuffle($seeds);
    
$seed $seeds[mt_rand(0count($seeds)-1)];
    unset(
$seeds);

    
// Makes a Double Precision Number or Floating Point
    
$parts explode(' '$seed);
    foreach(
$parts as $key => $value)
    if (!
is_numeric($value) && is_string($value))
        unset(
$parts[$key]);
    
shuffle($parts);
    
$keys array_keys($parts);
    switch((string)
mt_rand(0,11)) {
        default:
            
$float = ($parts[$keys[mt_rand(0count($keys)-1)]] * sqrt(microtime(true)));
            break;
        case 
"1":
            
$float = ($parts[$keys[mt_rand(0count($keys)-1)]] / sqrt(microtime(true)));
            break;
        case 
"2":
            
$float = ($parts[$keys[mt_rand(0count($keys)-1)]] - sqrt(microtime(true)));
            break;
        case 
"3":
            
$float = ($parts[$keys[mt_rand(0count($keys)-1)]] + sqrt(microtime(true)));
            break;
        case 
"4":
            
$float = (sqrt($parts[$keys[mt_rand(0count($keys)-1)]]) * microtime(true));
            break;
        case 
"5":
            
$float = (sqrt($parts[$keys[mt_rand(0count($keys)-1)]]) / microtime(true));
            break;
        case 
"6":
            
$float = (sqrt($parts[$keys[mt_rand(0count($keys)-1)]]) - microtime(true));
            break;
        case 
"7":
            
$float = (sqrt($parts[$keys[mt_rand(0count($keys)-1)]]) + microtime(true));
            break;
        case 
"8":
            
$float = (sqrt($parts[$keys[mt_rand(0count($keys)-1)]]) * sqrt(microtime(true)));
            break;
        case 
"9":
            
$float = (sqrt($parts[$keys[mt_rand(0count($keys)-1)]]) / sqrt(microtime(true)));
            break;
        case 
"10":
            
$float = (sqrt($parts[$keys[mt_rand(0count($keys)-1)]]) - sqrt(microtime(true)));
            break;
        case 
"11":
            
$float = (sqrt($parts[$keys[mt_rand(0count($keys)-1)]]) + sqrt(microtime(true)));
            break;
    }
    unset(
$keys);
    unset(
$parts);

    
// Constructs Integer from Floating Point/Double
    
$parts explode("."$float);
    if (
count($parts)==2) {
        switch((string)
mt_rand(0,7)) {
            default:
                
$int = (integer)$float;
                break;
            case 
"1":
                
$int $parts[0] * $parts[1];
                break;
            case 
"2":
                
$int $parts[0] . $parts[1];
                break;
            case 
"3":
                
$int $parts[1] . $parts[0];
                break;
            case 
"4":
                
$int = (integer)($parts[1] / $parts[0]);
                break;
            case 
"5":
                
$int = (integer)($parts[0] / $parts[1]);
                break;
            case 
"6":
                
$int = (integer)($parts[1] * $parts[0]);
                break;
            case 
"7":
                
$int = (integer)($parts[0] * $parts[1]);
                break;
                
        }
    } else {
        
$int = (integer)$float;
    }

    
// Randomise the Seeding with Integer
    
if (!headers_sent())
        
header('Context-seed: ' sha1($int));
    return 
$int;
}

// Call Routine to Randomise Seed
mt_srand(makeRandomSeeded());
srand(makeRandomSeeded());



159
wishcraft
Re: Ultimate Seed with DOM and seeding Feed from Chronolabs

This is the Ultimate DOM Randomisation method with the seeding feed (http://seed.feeds.labs.coop) for seeding your randomisation! which is very important:

/**
 * Function: makeRandomSeeded() - Seeds the Selection Process of Random Sorting & Selection
 * 
 * @param $filename string - Source of Seeding XML
 * @return integer - the seed used     
 */
function makeRandomSeeded($filename 'http://seed.feeds.labs.coop/') {
    
error_reporting(E_ERROR);
    
    
// Loads XML by forcing loadXML with DOM 
    
$xml file_get_contents($filename);
    
$doc = new DOMDocument();
    
$doc->loadXML($xml);

    
// Parses Description Tag and Remove help and File Descriptor
    
$skip = array('This feed can''Current mode is');
    
$elements $doc->getElementsByTagName('description');
    foreach(
$elements as $element) {
        
$seed $element->nodeValue;
        
$found false;
        foreach(
$skip as $find) {
            if (
substr($seed0strlen($find))==$find) {
                
$found true;
            }
        }
        if (
$found==false)
            
$seeds[] = $seed;
    }
    
    
// Selects Seed from $seeds
    
shuffle($seeds);
    
$seed $seeds[mt_rand(0count($seeds)-1)];
    unset(
$seeds);
    
    
// Makes a Double Precision Number or Floating Point
    
$parts explode(' '$seed);
    foreach(
$parts as $key => $value)
        if (!
is_numeric($value) && is_string($value))
            unset(
$parts[$key]);
    
shuffle($parts);
    
$keys array_keys($parts);
    switch((string)
mt_rand(0,11)) {
        default:
            
$float = ($parts[$keys[mt_rand(0count($keys)-1)]] * sqrt(microtime(true)));
            break;
        case 
"1":
            
$float = ($parts[$keys[mt_rand(0count($keys)-1)]] / sqrt(microtime(true)));
            break;
        case 
"2":
            
$float = ($parts[$keys[mt_rand(0count($keys)-1)]] - sqrt(microtime(true)));
            break;
        case 
"3":
            
$float = ($parts[$keys[mt_rand(0count($keys)-1)]] + sqrt(microtime(true)));
            break;
        case 
"4":
            
$float = (sqrt($parts[$keys[mt_rand(0count($keys)-1)]]) * microtime(true));
            break;
        case 
"5":
            
$float = (sqrt($parts[$keys[mt_rand(0count($keys)-1)]]) / microtime(true));
            break;
        case 
"6":
            
$float = (sqrt($parts[$keys[mt_rand(0count($keys)-1)]]) - microtime(true));
            break;
        case 
"7":
            
$float = (sqrt($parts[$keys[mt_rand(0count($keys)-1)]]) + microtime(true));
            break;
        case 
"8":
            
$float = (sqrt($parts[$keys[mt_rand(0count($keys)-1)]]) * sqrt(microtime(true)));
            break;
        case 
"9":
            
$float = (sqrt($parts[$keys[mt_rand(0count($keys)-1)]]) / sqrt(microtime(true)));
            break;
        case 
"10":
            
$float = (sqrt($parts[$keys[mt_rand(0count($keys)-1)]]) - sqrt(microtime(true)));
            break;
        case 
"11":
            
$float = (sqrt($parts[$keys[mt_rand(0count($keys)-1)]]) + sqrt(microtime(true)));
            break;
    }
    unset(
$keys);
    unset(
$parts);
    
    
// Constructs Integer from Floating Point/Double
    
$parts explode("."$float);
    if (
count($parts)==2) {
        switch((string)
mt_rand(0,5)) {
            default:
                
$int = (integer)$float;
                break;
            case 
"1":
                
$int $parts[0] * $parts[1];
                break;
            case 
"2":
                
$int $parts[0] . $parts[1];
                break;
            case 
"3":
                
$int $parts[1] . $parts[0];
                break;
            case 
"4":
                
$int = (integer)($parts[1] / $parts[0]);
                break;
            case 
"5":
                
$int = (integer)($parts[0] / $parts[1]);
                break;
                    
        }
    } else {
        
$int = (integer)$float;
    }
    
    
// Randomise the Seeding with Integer
    
srand($int);
    
mt_srand($int);
    if (!
headers_sent())
        
header('Context-seed: ' sha1($int));
    return 
$int;
}


This will offer you an integer seed rather than parsing the full seed and is more largely based in the shuffle command selecting a number from the seeding token!



160
wishcraft
Seed your randomisation selection in modules!! Important!!

I can’t stress how important it is to seed your randomisation process in code! better still something we found in the BBS Days was if we didn’t seed from a token from outside our systems abstraction layer we would go in circles and so would our users. Here at chronolabs we offer a feed of randomly changing token on each impression, it also randomly displays a different number of them this is from http://seed.feeds.labs.coop in the example below I use DOM to load the XML, Extract the randomisation tokens and then with mt_srand and srand seed the random selecting processes! The following function when you call it will seed your random selection process in both the old and new random selection routines all you need to do is call the function! This will work with any version of PHP 5 and any earlier with DOM Objectivity.

/* 
 * function that randomisation from a seed source tokens to make selection better
 */
function makeRandomSeeded() {
    
$file 'http://seed.feeds.labs.coop/';
    
$doc = new DOMDocument();
    
$doc->loadHTMLFile($file);
    
$skip = array('This feed can''Current mode is');
    
$elements $doc->getElementsByTagName('description');
    foreach(
$elements as $element) {
        
$seed $element->nodeValue;
        
$found false;
        foreach(
$skip as $find) {
            if (
substr($seed0strlen($find))==$find) {
                
$found true;
            }
        }
        if (
$found==false)
            
$seeds[] = $seed;
    }
    
shuffle($seeds);
    
mt_srand($seeds[mt_rand(0count($seeds)-1)]);
    
srand($seeds[mt_rand(0count($seeds)-1)]);
}




TopTop
« 1 ... 13 14 15 (16) 17 18 19 ... 135 »



Login

Who's Online

190 user(s) are online (83 user(s) are browsing Support Forums)


Members: 0


Guests: 190


more...

Donat-O-Meter

Stats
Goal: AU$15.00
Due Date: Jul 31
Gross Amount: AU$0.00
Net Balance: AU$0.00
Left to go: AU$15.00
Make donations with PayPal!

Latest GitHub Commits