• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

[8wayRun.Com] XenPorta (Module Add-Ons)

Will try that, thanks for replying :)

btw which add on you are using to display ads on your site ? the one that appearing on sidebar
 
Will try that, thanks for replying :)

btw which add on you are using to display ads on your site ? the one that appearing on sidebar
for ads you dont need a addon. just use the ad templates.
or you can use rotating ads, nice addon.
 
^Thanks for replying :)

I thought ad templates only on forum page, not on xenporta... Will try that.

So where is the side bar template of xenporta ?
 
^Thanks for replying :)

I thought ad templates only on forum page, not on xenporta... Will try that.

So where is the side bar template of xenporta ?
you have to create new layouts: index and thread-forum, maybe article
 
I am glad you are in php :)
By the way try this examples

Template

Code:
<div class="messageText ugc baseHtml">
        <div class="secondaryContent">
            <h3>test</h3>           
                  <xen:foreach loop="$ImgBlock" value="$sampledata">
                      <div>
                        {$sampledata}
                      </div>
                  </xen:foreach>         
        </div>
    </div>

php

PHP:
<?php
class EWRporta_Block_ImgBlock extends XenForo_Model
{
public function getModule()
    {
        $sampledata = 'i am in php';
        $sampledata = array(
 
            'sample' => $sampledata 
            );
 
    return $sampledata;
    }
}

or:

PHP:
<?php
class EWRporta_Block_ImgBlock extends XenForo_Model
{
public function getModule()
    {
    $sampledata[] = 'i am in php';
   
    return $sampledata;
    }
}
 
  • Like
Reactions: avi
In need of a widget that displays this:
https://twitter.com/about/resources/widgets/widget_profile

The build in twitter widget...I can only assume not a lot of thought was put into it, lol.

Either way...I had a working widget that did this for the old xenporta (custom). It was easy to make....but the block creator that is built in now..it's utterly useless. Why change what isn't broken?

Or if somebody could convert/tell me how to convert the attached 1.4.x widget?
 

Attachments

boban, thank you very much for replying :)

We am trying to deploy following php code into module, can you tell us how ?

PHP:
<?php 
function getRandomFromArray($ar) { 
    mt_srand( (double)microtime() * 1000000 ); 
    $num = array_rand($ar); 
    return $ar[$num]; 
} 
 
function getImagesFromDir($path) { 
    $images = array(); 
    if ( $img_dir = @opendir($path) ) { 
        while ( false !== ($img_file = readdir($img_dir)) ) { 
            // checks for gif, jpg, png 
            if ( preg_match("/(\.gif|\.jpg|\.png)$/", $img_file) ) { 
                $images[] = $img_file; 
            } 
        } 
        closedir($img_dir); 
    } 
    return $images; 
} 
 
$root = ''; 
// If images not in sub directory of current directory specify root  
//$root = $_SERVER['DOCUMENT_ROOT']; 
 
$path = 'images/'; 
 
// Obtain list of images from directory  
$imgList = getImagesFromDir($root . $path); 
 
$img = getRandomFromArray($imgList); 
 
?>
 
<img src="<?php echo $path . $img ?>" style="border:1px solid #83b2e4; border-radius:5px; padding:3px; margin:-8px 0px 0px -3px;" width="230" height="230" />

You can see the demo of this code here. It will just shows random images everytime user refreshes the page.

Thank you in advance :D
 
In need of a widget that displays this:
https://twitter.com/about/resources/widgets/widget_profile

The build in twitter widget...I can only assume not a lot of thought was put into it, lol.

Either way...I had a working widget that did this for the old xenporta (custom). It was easy to make....but the block creator that is built in now..it's utterly useless. Why change what isn't broken?

Or if somebody could convert/tell me how to convert the attached 1.4.x widget?
Ha. Funny that someone just posted this. I just tried changing the .twtr-tweet a{ color code to the custom color of my choice in EXTRA.css and I'm not able to overwrite the current color because it also has !important in front of it. Anyone who can help me out with this? Thanks.
 
Figured I would post the answer to my own question above for anyone who might run across the problem. To change the link color of your twitter feed just go to ACP > Appearance > Templates > EWRblock_twitter and you can change the color to suite your needs.
 
Trying to add a second html block but since I already have one there, it won't upload the second one even though created a duplicate one and name it _2. Keep getting an error message.

I'm trying to use it to place a banner in the side bar. Does anyone know how to best do that?
 
Change all references of htmlblock to htmlbock2 (or whatever) in the code as well as the filename.

Boban might correct me but I assume that's enough to create a second instance of the block.
 
Try to re-import the XML files from folder, library/EWRPorta/XML_Addons.

When i try to upload blocks, I'm getting an error: "The provided file was not a valid XML file. Please provide a valid XML file."

Is there a version incompatibility?
 
Your obviously not going into..........ACP-Options-Blocks-Install Block.......Then upload from your computer not your server the xml file(s) from the XML_Addons folder (as in the address you quote)

There are other XML files like in the "blocks" Folder and elsewhere..etc.....(as mentioned on this and previous pages) that will not work

Good luck :^)
 
Top Bottom