Page 6 of 6

Re: Adding a custom block / einen eigenen Block hinzufügen

Posted: 11. June 2010 13:00
by Bash
It worked!

I just left that last edit as it was.

I now have an additional block which functions the same as the news block :D

Re: Adding a custom block / einen eigenen Block hinzufügen

Posted: 18. July 2010 21:01
by Jennifer Lynn
Hi there,

My experience with phpbb has been 4 weeks so I am a beginner. I have read a lot of documentation prior to any installations and tried to understand every detail before moving forward. So far I have succesfully installed phpbb as well as the portal without any issues :) I have also read instructions and added the portal 'link' to the ACP by following a post on this forum.

My next challenge is to learn how to add custom blocks. I have read through your documentation and it indicated how to create your new file and where to add the scripting minus the 'IF' statements as those are just for the ACP and original blocks.

I will have more questions once I get started, however my first is: Is it possible to configure so the new boxes will show up in the ACP where you can input the information as needed OR do you have to put your data into your new block file? As a simpler way of phrasing the same question -- I'm looking at just duplicating what is already there and have more than just the small and centre box in the ACP. So when you go into your ACP you can turn them on and off as desired.

I apologize if the answer is on the board here somewhere. I did do a search first before posting, however if I missed it -- would you kindly re-direct me.

I appreciate your time,

Jennifer Lynn

Re: Adding a custom block / einen eigenen Block hinzufügen

Posted: 26. August 2010 14:01
by mstaviation
Hello Guys,

I don`t exaclty understand something. I want to make my own custum block on the left site of the menu. So i followed the this topic : knowledge/kb_show.php?id=51

I have made my own html file : styles\subsilver2\template\portal\block\maas.html
First of, make a new file (your Block) in \styles\your_style\template\portal\block\ and call it i.e. new_block.html
Now you have to decide if this Block will be a center block or if it will be in left or right column.
Last but not least you should know, if your Style is based on prosilver or subsilver2.
but i don`t understand what i have to fill in here : ... Place your Code here ...??
left/ right Block for prosilver:

Code: Select all
{$LR_BLOCK_H_L}Your_Block_Title{$LR_BLOCK_H_R}
<div style="text-align: center;">

... Place your Code here ...

</div>
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
Who can help me?

Re: Adding a custom block / einen eigenen Block hinzufügen

Posted: 1. September 2010 10:38
by mstaviation
mstaviation wrote:Hello Guys,

I don`t exaclty understand something. I want to make my own custum block on the left site of the menu. So i followed the this topic : knowledge/kb_show.php?id=51

I have made my own html file : styles\subsilver2\template\portal\block\maas.html
First of, make a new file (your Block) in \styles\your_style\template\portal\block\ and call it i.e. new_block.html
Now you have to decide if this Block will be a center block or if it will be in left or right column.
Last but not least you should know, if your Style is based on prosilver or subsilver2.
but i don`t understand what i have to fill in here : ... Place your Code here ...??
left/ right Block for prosilver:

Code: Select all
{$LR_BLOCK_H_L}Your_Block_Title{$LR_BLOCK_H_R}
<div style="text-align: center;">

... Place your Code here ...

</div>
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
Who can help me?
?? someone

Re: Adding a custom block / einen eigenen Block hinzufügen

Posted: 1. September 2010 21:28
by ixl
but i don`t understand what i have to fill in here : ... Place your Code here ...??
Hi,

If I can help, ive just done this additional custom block, reading through the notes on the first page link. Its actually very simple. ( Im assuming im right, as I have it working for me )

Basically, unlike the default custom blocks ( small and middle ) that come with the board3 install, which can be managed via the ACP Mod tab, this "additional custom blocks" are hard coded. Which means, you enter the HTML or IFRAME,( or whatever ) code that you wish to put in your new block in that very space, over writing the words " ... Place your Code here .." with what you want to put in. You cannot change this new block from the ACP custom block admin. So whatever you had intented to put in the acp custom code box for the acp versions of the custom blocks, you need to put it in the gap as stated instead.

So just put in there after :

Code: Select all

 <div style="text-align: center;">


and before

Code: Select all

 </div>
code with the information you want to put in your new custom block. :)

Hope thats ok.

Re: Adding a custom block / einen eigenen Block hinzufügen

Posted: 17. September 2010 16:57
by diesusi
Hallo,
ich hab eine kleine Frage zu den eigenen Blöcken und zwar habe ich den Blog Mod installiert und würde gerne die neusten Blogeinträge in einem custum block anzeigen lassen.

Mein style ist prosilver und der block soll in die Mitte.

Diesen Code http://lithiumstudios.org/forum/viewtop ... 1045#p8093
habe ich zwischen den code für Mitte+prosilver gesetzt, allerdings bekomme ich nur einen leeren Block angezeigt.

Meine komplette blog_block.html sieht so aus:

Code: Select all

    {$LR_BLOCK_H_L}&nbsp;Letzte Blogs{$LR_BLOCK_H_R}
                 <div style="text-align: center;">
             
    <!-- IF .recent_blogs -->
    <div class="post bg3" style="text-align: center;">
       <span class="corners-top"><span></span></span>
          <strong>{L_RECENT_BLOGS}</strong>
       <span class="corners-bottom"><span></span></span>
    </div>
    <!-- BEGIN recent_blogs -->
       <div class="post bg1<!-- IF recent_blogs.S_REPORTED or recent_blogs.S_UNAPPROVED --> reported<!-- ENDIF --><!-- IF recent_blogs.S_DELETED --> deleted<!-- ENDIF -->" <!-- IF recent_blogs.POST_COLOR and not recent_blogs.S_REPORTED and not recent_blogs.S_UNAPPROVED and not recent_blogs.S_DELETED -->style="background-color: {recent_blogs.POST_COLOR}"<!-- ENDIF -->>
          <div class="inner"><span class="corners-top"><span></span></span>

          <div class="postbody" style="width: 100%;">
             <!-- IF recent_blogs.S_UNAPPROVED or recent_blogs.S_REPORTED -->
                <p class="rules">
                   <!-- IF recent_blogs.S_UNAPPROVED -->{UNAPPROVED_IMG} <a href="{recent_blogs.U_APPROVE}"><strong>{L_UNAPPROVED}</strong></a><!-- ENDIF -->
                   <!-- IF recent_blogs.S_REPORTED -->{REPORTED_IMG} <a href="{recent_blogs.U_REPORT}"><strong>{L_REPORTED_SHORT}</strong></a><!-- ENDIF -->
                </p>
             <!-- ENDIF -->

             <dl>
                <dt>
                   <strong><!-- IF recent_blogs.S_HAS_POLL --><img src="{T_THEME_PATH}/images/blog/icon_poll.gif" style="float: right;" alt="" /> <!-- ENDIF --><a href="{recent_blogs.U_VIEW}">{recent_blogs.TITLE}</a></strong> {L_POST_BY_AUTHOR} <strong>{recent_blogs.USER_FULL}</strong>  {L_POSTED_ON_DATE} {recent_blogs.DATE} <br />
                   <div class="content" style="width: 95%; padding: 4px;">{recent_blogs.MESSAGE}</div>

                   <!-- IF recent_blogs.S_HAS_ATTACHMENTS -->
                      <dl class="attachbox">
                         <dt>{L_ATTACHMENTS}</dt>
                      </dl>
                   <!-- ENDIF -->

                   <br clear="all" />
                   <div>
                      <span class="num_replies">{recent_blogs.REPLIES}</span>
                      {recent_blogs.VIEWS}
                   </div>
                </dt>
             </dl>
          </div>
          <span class="corners-bottom"><span></span></span>
       </div>
    </div>
    <!-- END recent_blogs -->
    <!-- ENDIF -->               
    </div>
        {$LR_BLOCK_F_L}{$LR_BLOCK_F_R} 
Kann mir jemand sagen, was ich falsch gemacht habe?

Grüße,
susi

edit: // hat sich erledigt, danke!

Re: Adding a custom block / einen eigenen Block hinzufügen

Posted: 19. September 2010 17:26
by Munra
Can someone give me an example of a if statement to restrict a custom block to a certain user group?

Thanks for all the other information already posted :) Its a real help.

Re: Adding a custom block / einen eigenen Block hinzufügen

Posted: 15. January 2011 19:52
by Ben
Habe mir einen neuen Block in der mitte erstellt,ein Bild Code eingefügt.Blos bekomme ich das Bild nicht mittig es bleibt immer links.
{$C_BLOCK_H_L}<dl><dt>Willkommen</dt></dl>{$C_BLOCK_H_R}
<ul class="topiclist forums">
<li><dl>
<dd style="border-left: 0px">

<center><img src="http://s1.directupload.net/images/11011 ... "></center>

</dd>
</dl></li>
</ul>
{$C_BLOCK_F_L}{$C_BLOCK_F_R}
Klappt das überhaupt oder was mache ich da falsch?

Re: Adding a custom block / einen eigenen Block hinzufügen

Posted: 15. January 2011 22:23
by archivar
Hallo Ben,
statt dessen:

Code: Select all

<center><img src="http://s1.directupload.net/images/110115/noyglnm2.png"></center>
nimmst Du das hier:

Code: Select all

<div align="center">
<img src="http://s1.directupload.net/images/110115/noyglnm2.png" alt="" />
</div>
Über Google-Suche hättest Du es auch gefunden: html code bild zentrieren ;)

Re: Adding a custom block / einen eigenen Block hinzufügen

Posted: 15. January 2011 22:55
by Ben
Stimmt,aber trotzdem DANKE !!

Re: Adding a custom block / einen eigenen Block hinzufügen

Posted: 4. June 2011 13:54
by Michel_61
Moin,
mal meinen allerherzlichsten Dank für dieses Snippet,

Ich hab ein Problem mit einem Subsilver Style, Black Pearl, gehabt, wo ich die Links zu den Mod's nicht im Header untergebracht bekam.
Der eigene Block war da die Lösung und genau an die Anleitung gehalten hab ich sogar MOD's die nur für Prosilver gedacht waren im Subsilver zum laufen gebracht.

Meinen Dank hierfür... :D

Grüsse Micha

Re: Adding a custom block / einen eigenen Block hinzufügen

Posted: 13. July 2011 11:45
by Terr0r
If I install a extra block in the portal is there then a option that I can disable and eneble that block in the ACP

Re: Adding a custom block / einen eigenen Block hinzufügen

Posted: 4. August 2011 10:26
by ixl
Terr0r wrote:If I install a extra block in the portal is there then a option that I can disable and eneble that block in the ACP
No. If you add manual blocks, they are only editable manually. You can enable and disable the view of them from non logged in users, but thats about all I believe.

Re: Adding a custom block / einen eigenen Block hinzufügen

Posted: 4. December 2011 20:50
by Joschi
Hallo,
ich habe einen neuen Block (unter 1.0.6) nach der BEschreibung eingebunden:

Code: Select all

{$LR_BLOCK_H_L}<span style="float: left"><img src="{T_THEME_PATH}/images/portal/portal_stats.png" width="16px" height="16px" alt="" /> neuer Block {$LR_BLOCK_H_R}
<table class="tablebg" cellspacing="1" width="100%">
   <tr class="row1">
      <td style="text-align:center;">
..HIER KOMMT TEXT REIN...
    <a href="http://www.meinehomepage.de/" onclick="window.open(this.href); return false;" title="xxxxxx">
    <img src="http://www.meinehomepage/forum/bilder/bild_xxx_150.jpg" width="150" height="50" alt="xxxxx" /></a>
         
      </td>
   </tr>
</table>
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
Der Block wird angezeigt aber der Inhalt/die Grafik nicht- es wird nur das "..HIER KOMMT TEXT REIN..." angezeigt.
was ist falsch??
Danke

Re: Adding a custom block / einen eigenen Block hinzufügen

Posted: 6. January 2012 22:12
by archivar
Hallo Joschi,
versuche es mal damit:

Code: Select all

{$LR_BLOCK_H_L}<span style="float: left"><img src="{T_THEME_PATH}/images/portal/portal_stats.png" width="16px" height="16px" alt="" /> neuer Block {$LR_BLOCK_H_R}
<table class="tablebg" cellspacing="1" width="100%">
   <tr class="row1">
      <td style="text-align:center;">
	  <div class="postbody">
..HIER KOMMT TEXT REIN...
    <a href="http://www.meinehomepage.de/" onclick="window.open(this.href); return false;" title="xxxxxx">
    <img src="http://www.meinehomepage/forum/bilder/bild_xxx_150.jpg" width="150" height="50" alt="xxxxx" /></a>
      </div>
      </td>
   </tr>
</table>
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}