Jump to content

(e32) Custom Sidebar Blocks


(e) Eric
 Share

Recommended Posts

Eric, any help with this question? Thanks

I'm not sure I understand the question. Every block can have an icon/image, are you referring to something different than that?

is there a easy way to use the code

<?php include("file.php"); ?>

I have got a a php file which displays an age based on a DOB and i want to display it next to a persons name.

When i try to use this code it does not display

Thanks

Rob

In the block contents put everything but the php tags (<?php and ?>). And make sure that PHP mode is enabled.

hi great hook!

Quick question the hook says IPB 3.4 for support

will this work with 3.3.X ?

Yeah it should. If it doesn't, then let me know.

Link to comment
Share on other sites

I'm not sure I understand the question. Every block can have an icon/image, are you referring to something different than that?

If you click the link to our forums (in signature), you will notice that the very first block on the right sidebar has a countdown timer. At the heading of that block it says "Next Game"; well just before that heading, on the left, there's an icon of a clock. That's the type of icon/image I'm referring to. Is it possible to add a small icon like that to the left side of the heading of each block? If so, where and what would be the proper code? If not, it's all good, was just wondering. :smile:

Link to comment
Share on other sites

Very new to coding and your sidebar blocks, I have the app installed and running.

Was hoping to add in the recent topics so that I could move it on top of my ads, went to hooks and tried to copy and paste code to the add blocks section but that didn't work. Any tips there?

Also, is it possible to have the sidebar display in forum view as well, or is it just on the board index page. I would like to be able to use it to show ads while members are in the forums as well

Link to comment
Share on other sites

If you click the link to our forums (in signature), you will notice that the very first block on the right sidebar has a countdown timer. At the heading of that block it says "Next Game"; well just before that heading, on the left, there's an icon of a clock. That's the type of icon/image I'm referring to. Is it possible to add a small icon like that to the left side of the heading of each block? If so, where and what would be the proper code? If not, it's all good, was just wondering. :smile:

Hmm, I still must be missing something. Each custom block can already have an icon. For instance, in the top block that you referenced, the image being used is:

I'm actually not sure how that particular image was used, since all the icons for blocks should be in the "master" directory.

Very new to coding and your sidebar blocks, I have the app installed and running.

Was hoping to add in the recent topics so that I could move it on top of my ads, went to hooks and tried to copy and paste code to the add blocks section but that didn't work. Any tips there?

Also, is it possible to have the sidebar display in forum view as well, or is it just on the board index page. I would like to be able to use it to show ads while members are in the forums as well

You can already rearranged blocks by going to ACP->Manage Hooks. Then from there drag and drop the hooks so that they are in the right order (for instance, drag the Recent Topics hook to the top). You shouldn't need CSB for that.

No, this app simply extends the index sidebar. To get a block to show elsewhere you would another app.

Link to comment
Share on other sites


Hmm, I still must be missing something. Each custom block can already have an icon. For instance, in the top block that you referenced, the image being used is:

I'm actually not sure how that particular image was used, since all the icons for blocks should be in the "master" directory.


The Countdown Timer block is not using your 'Custom Sidebar Blocks' App. I'm using a separate image directory for that block. The blocks that are using your 'Custom Sidebar Blocks' App are the Facebook and the YouTube blocks. Those two don't have an icon/image, at least not on my side. We're using v3.3.4 by the way.
Link to comment
Share on other sites

Ah. All you need to do is to input the relative path to the image you want to show in the image setting in each block. So if you want to show a facebook icon on your facebook block, for example, simply find a facebook icon and paste it into your style_images/master directory and then type the name of it on that block's image setting.

Link to comment
Share on other sites

When you are editing a block, you have the option of adding an image (or rather a path to an image). So go to edit a block and find the image setting and add an appropriate path, If you can't find the setting for the image for that block, press Ctrl-F on your keyboard and enter "image" without the quotes and that should point you in the right direction.

Link to comment
Share on other sites

When you are editing a block, you have the option of adding an image (or rather a path to an image). So go to edit a block and find the image setting and add an appropriate path, If you can't find the setting for the image for that block, press Ctrl-F on your keyboard and enter "image" without the quotes and that should point you in the right direction.

Thanks for your help Eric. +1 :thumbsup:

Link to comment
Share on other sites

Yeah, it is quite possible that the html-editor stuff might conflict. There are so many variables within CSB in terms of syntax. So the best bet if you are doing html is to simply turn off the editor. But with that being said, can you post the block contents you are working with? I'll play with it on my test board and see if I can get it working within the framework of the editor.

Link to comment
Share on other sites

Yeah, it is quite possible that the html-editor stuff might conflict. There are so many variables within CSB in terms of syntax. So the best bet if you are doing html is to simply turn off the editor. But with that being said, can you post the block contents you are working with? I'll play with it on my test board and see if I can get it working within the framework of the editor.

It's just a simple list of people....here is the code and what it shows with editor on...

Code:


[*]tmwrk7[/*]
[*]miramike[/*]
[*]fred[/*]




And how it shows turned on. Happens when you try and add someone else to the list as pictured (Test was added for screen capture)

post-130113-0-28489600-1357701790_thumb.

Link to comment
Share on other sites

Ah, so you are using the bbcode for list and it works initially however it ads a second dot (and line) for every entry so when you save it again it isn't right. I'll look into it. For now you might need to edit it manually before resaving. You might also try enabling HTML mode and using the ul and li list tags until I get a fix.

Link to comment
Share on other sites

It's just a simple list of people....here is the code and what it shows with editor on...

Code:


[*]tmwrk7[/*]
[*]miramike[/*]
[*]fred[/*]




And how it shows turned on. Happens when you try and add someone else to the list as pictured (Test was added for screen capture)

attachicon.gifCapture.JPG

Hi Volstate. Looking at your code, I was curious why you have [/*] at the end of each line. When I do it that way, I get this:

  • tmwrk7[/*]
  • miramike[/*]
  • fred[/*]
Link to comment
Share on other sites

Hi Volstate. Looking at your code, I was curious why you have [/*] at the end of each line. When I do it that way, I get this:

  • tmwrk7[/*]

  • miramike[/*]

  • fred[/*]

I'm not really sure why those are in there. I didn't put that code in the editor did when I switched it to off. I went back and tried to delete them ([/*]) and it won't let me. Is that a bug or something? That's strange...

Link to comment
Share on other sites

Yeah, as I mentioned in my post 5 posts up, there is a parsing issue with the viewing of a saved block. So it works when you save it, however when you view the saved block contents it adds a new line and dot for every list item. So then if you resave it, it will do it again and the bug will then be viewable. As I mentioned earlier, I'll look into a fix, but for now try the above temporary fixes.

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...