Jump to content

(e32) Custom Sidebar Blocks


(e) Eric
 Share

Recommended Posts

Hello!

I've successfully installed this and although all other embeds work alright, the one I am interest to embed, failed miserably.

It's the widget code from the online fundraising site YouCaring.

Below you can see an example embed code (not from my fundraising as I am not looking to promote it here):

<iframe src="https://www.youcaring.com/fundraiser-widget.aspx?frid=59159" width="260" height="377" frameborder="0" />

When I add that, even the block editor can't render fully, leaving me no option but to delete the block to be able to continue.

What's wrong with that?

Thanks in advance!

works for me

here are my CSB settings

Link to comment
Share on other sites

First of all, thank you very much for spending time to help me.

That's what I see. Not even the loading completes, so I can's see the buttons that saves changes or navigate through tabs:

post-15511-0-31360800-1382640081_thumb.p

Now, here is an idea:

If we compare the actual HTML output of our setups during Block editing, will it help?

Or is it security risk?

Link to comment
Share on other sites

  • 2 weeks later...

Dmacleo,

Can you maybe help me with the error I'm getting when I go into edit my Custom Side Bar blocks:

Fatal error: Call to undefined method parseBbcode::showEditor() in /home/twentysi/public_html/admin/applications_addon/other/customSidebarBlocks/skin_cp/cp_skin_e_CSB.php on line 52

Any help would be appreciated

-Greg

Link to comment
Share on other sites

Dmacleo,

Can you maybe help me with the error I'm getting when I go into edit my Custom Side Bar blocks:

Fatal error: Call to undefined method parseBbcode::showEditor() in /home/twentysi/public_html/admin/applications_addon/other/customSidebarBlocks/skin_cp/cp_skin_e_CSB.php on line 52

Any help would be appreciated

-Greg

never seen that so not sure.

is it one particular block or all of them?

I did have some code in one block that caused funky things before.

Link to comment
Share on other sites

i cant figure out how to get this working

i made a few test boxes none show up anywhere

i would really like to have this workin

you got permissions on the blocks set so people can view?

as far as showing theres not really much to it, shows on forum index sidebar with other hooks.

generally if the preview of the block in acp works it will work on board.

Link to comment
Share on other sites

  • 2 weeks later...

Hey can anyone send me the hook settings? I was messing with some code in the IP Content sidebar hook and this one was listed right underneath it and I got in a hurry and made edits to this one by accident so now it isnt showing up. :cry:

Can someone tell me what I screwed up?

Thanks

post-53825-0-08314400-1385097410_thumb.j

Link to comment
Share on other sites

  • 4 weeks later...

Sharing my code in order to have a block with last subjects of a specific forum (IPB 3.4.6):

//Forum id
$forum_id = 29;
//Topics number
$numberTopics = 3;

$this->DB->build( array(
		'select'	=> 't.tid, t.title, t.title_seo, t.last_poster_name, t.last_poster_id, t.seo_last_name, t.last_post',
		'from'		=> array( 'topics' => 't' ),
		'where'		=> 't.forum_id = '.$forum_id,
		'order'		=> 't.start_date DESC',
		'limit'		=> array( 0, $numberTopics )
		)		 );
$e = $this->DB->execute();

$html = "<ul class='ipsList_withminiphoto'>";

while($result = $this->DB->fetch($e)) {
        $photo = IPSMember::buildProfilePhoto($result['last_poster_id'], mini);
        $url = ipsRegistry::getClass('output')->buildSEOUrl( 'showtopic=' . $result['tid']."&amp;view=getnewpost", 'public', $result['title_seo'], 'showtopic' );
        $author = IPSMember::makeProfileLink($result['last_poster_name'], $result['last_poster_id'], $result['seo_last_name']);
        $date = ipsRegistry::getClass('class_localization')->formatTime($result['last_post']);
        
        $html .= '<li class="ipsPad_half" style="word-break: break-word;">';
        
        $html .= '<div class="left">';
        $html .= $photo;
        $html .= '</div>';
        
        $html .= '<div class="list_content">';
        $html .= '<a href="'.$url.'"><b>'.$result['title'].'</b></a>';
        $html .= '<br />';
        $html .= 'Auteur: '.$author.' <span class="date">('.$date.")</span>";
        $html .= '</div>';
        
        $html .= '</li>';
}

$html = $html."</ul>";

return $html;
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

I am not sure where I got this but I have a small php file and an images folder and then add a bunch of photos and on every refresh it changes the image. It even opens the images on a lightbox.

I have the script for what I added to make the block but it works for me. I know that isn't exactly what your looking for. I just tried searching for it on the forums. Basically you add this rotate.php file to your server and then create an image folder add your images and then add a bit of code to a custom side bar block and it will change the image every time.

I can send you the file and the code if that is something that might work for you. Obviously in the code for the block you would have to change to your folder structure and domain for your site but it should work.

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

I think a good adition to this APP would be a new setting to allow blocks to appear randomly.

I made it to a client who sells the space to his clients, just by changing the ORDER in rebuildBlockCache function:

        #get block
        $this->DB->build( array( 'select'    => 'csb.*',
                                 'from'        => array ('custom_sidebar_blocks' => 'csb' ),
                                 //'order'    => 'csb.csb_position ASC',
                                 'order'    => 'rand()',
                                 'add_join' => array(
                                                     array(    'select' => 'p.*',            
                                                            'from'   => array( 'permission_index' => 'p' ),
                                                            'where'  => "p.app = 'customSidebarBlocks' AND p.perm_type='block' AND perm_type_id=csb.csb_id",
                                                            'type'   => 'left',
                                                          )  
                                                    )
                        )        );   

Everytime someone goes to the index, blocks appears in a different way.

Made it directly but it would be nice if it were a new setting. Something like that:

        $order = $this->settings['e_CSB_random'] == 'random' ? 'rand()' : 'csb.csb_position ASC';

        #get block
        $this->DB->build( array( 'select'    => 'csb.*',
                                 'from'        => array ('custom_sidebar_blocks' => 'csb' ),
                                 'order'    => $order,
                                 'add_join' => array(
                                                     array(    'select' => 'p.*',            
                                                            'from'   => array( 'permission_index' => 'p' ),
                                                            'where'  => "p.app = 'customSidebarBlocks' AND p.perm_type='block' AND perm_type_id=csb.csb_id",
                                                            'type'   => 'left',
                                                          )  
                                                    )
                        )        );
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...