Advertisement:

Author Topic: Board Icons  (Read 33365 times)

Offline Bachian

  • Semi-Newbie
  • *
  • Posts: 46
Re: Board Icons
« Reply #40 on: May 26, 2014, 11:35:40 PM »
I don't know why it doesn't work.

Maybe this will help.


TheListener

  • Guest
Re: Board Icons
« Reply #41 on: May 26, 2014, 11:37:55 PM »
Did you install the mod despite the test failed messages?

Offline Bachian

  • Semi-Newbie
  • *
  • Posts: 46
Re: Board Icons
« Reply #42 on: May 26, 2014, 11:43:23 PM »
Yes. And it didn't work.

TheListener

  • Guest
Re: Board Icons
« Reply #43 on: May 26, 2014, 11:45:35 PM »
Yes. And it didn't work.

That's why it doesn't work.

Use the mods parser which is on the mods download page to see which files marked test failed need a manual edit.

Offline Bachian

  • Semi-Newbie
  • *
  • Posts: 46
Re: Board Icons
« Reply #44 on: May 27, 2014, 01:15:48 AM »
Did that. Still isn't working.

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Board Icons
« Reply #45 on: May 27, 2014, 01:18:41 AM »
Hello, so it isn't working in the default, Curve, Theme either??  According to your install log pic that you posted above, it should.

This mod does theme (template file) edits, so it is possible that the edits that it does, do not cater to your themes coding.  In that case, the edits will need to be done manually to that themes files... namely, "MessageIndex.template.php".  So, in that case, you can open up the zipped package and take a look at the xml file that modifies the "MessageIndex.template.php" file, and look at the operations in there, and alter them in your theme file to match according to your themes way of handling the output of Board Icons.

Offline Bachian

  • Semi-Newbie
  • *
  • Posts: 46
Re: Board Icons
« Reply #46 on: May 27, 2014, 01:23:17 AM »
Hello, so it isn't working in the default, Curve, Theme either??  According to your install log pic that you posted above, it should.  This mod does theme edits, so it is possible that the edits that it does, do not cater to your themes coding.  In that case, the edits will need to be done manually to that themes files... namely, "MessageIndex.template.php".

Yes, it does work on the Curve theme. But it won't work with Firox Multicolor by SMFSimple, which is the theme I like to use.

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Board Icons
« Reply #47 on: May 27, 2014, 01:25:31 AM »
You will need to edit the "MessageIndex.template.php" file manually, after installing the mod.  Already instructed on how to do this.  Cheers :)

Offline Bachian

  • Semi-Newbie
  • *
  • Posts: 46
Re: Board Icons
« Reply #48 on: May 27, 2014, 01:26:32 AM »
I have no idea how to do that... If I link the file here, from my theme could you modify it for me, or is it too much work?

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Board Icons
« Reply #49 on: May 27, 2014, 01:28:16 AM »
I am in the middle of releasing, yet another update for my Post Rating Pro mod, so, I've got my hands tied right now...  could possibly look at it another day... not sure.  Sorry...

Offline Bachian

  • Semi-Newbie
  • *
  • Posts: 46
Re: Board Icons
« Reply #50 on: May 27, 2014, 05:24:47 PM »
I figured it out. I had to make the same change to the boardindex.template.php as I did the messageindex.template.php in my theme's folder.

Find:
Code: [Select]
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

Replace with:
Code: [Select]
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
{
if ($board['new_img'] !== '')
echo '
<img src="', $board['new_img'], '" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
}
// Is it a redirection board?
elseif ($board['is_redirect'])
{
if ($board['redirect_img'] !== '')
echo '
<img src="', $board['redirect_img'], '" alt="*" title="*" />';
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
}
// No new posts at all! The agony!!
else
{
if ($board['no_new_img'] !== '')
echo '
<img src="', $board['no_new_img'], '" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
}

Offline samborabora

  • Full Member
  • ***
  • Posts: 517
Re: Board Icons
« Reply #51 on: June 20, 2014, 06:39:37 PM »
Honestly, for blocks with Simple Portal, I don't know how you would do it.  With Dream Portal, you can add layouts per board, and than the modules (blocks) on that layout will only show for that board.  So, for this, you could use the "Custom Module" and have the image inserted into it with a Transparent Module Template and will only show the image for that board and that board alone.

What might be better is to use a Custom Block in Simple Portal with PHP as the Code type (if possible) and have it show on the forum, and test it via the $_REQUEST['board'] variable.  You could than have it grab an image based on the board id returned within $_REQUEST['board'].

For example:

Code: [Select]
global $boardurl;
if (!empty($_REQUEST['board']))
    echo '
        <img src="' . $boardurl . '/images/boardicons/board_' . $_REQUEST['board'] . '" alt="" />';

So, this would output the image based on the following naming convention:  "board_{board id}"

Where {board_id} is the actual id value of the board that gets returned from $_REQUEST['board'].  If this variable is empty, it will not be shown.  Therefore this will be sure to display on all pages within the board (hopefully).  And you could use the same code within the Post.php and/or Post.template.php for when users are creating New Topics.  Ofcourse, you should probably check to be sure it is an integer value, but that I'll leave up to you.

Sorry for the late reply, but I'm trying to incorporate a board icon on the "post reply" page, in place of the "Subject" txt. I have SimplePortal still installed (unfortunatly, not DreamPortal), so if you can suggest what would be the best way of, basically, calling the image the exact same way the board template does, just for the current board, I'd be most grateful! I tried that code you gave me last year, and it just gives a image with an url to the images folder, followed the board number, which is a start, but unfortunately my board names don't use that naming convention, although, if needs be, I suppose I could rename them all to cooperate with the code; it would just be far easier if I could get it to call for the names of the images that have been defined in Board Icons mod.

EDIT: I'm just going to rename all of my board icons sequencially, and use this code for my post.template.php:

Find:
Code: [Select]
// Now show the subject box for this post.
echo '
<dt>
<span', isset($context['post_error']['no_subject']) ? ' class="error"' : '', ' id="caption_subject">', $txt['subject'], ':</span>

Replace with:

Code: [Select]
// Now show the subject box for this post.
echo '
<dt>
<span', isset($context['post_error']['no_subject']) ? ' class="error"' : '', ' id="caption_subject">
<img src="' . $settings['images_url'] . '/boardimgs/' . $_REQUEST['board'] . '.jpg" alt="" />
</span>
« Last Edit: June 20, 2014, 07:00:45 PM by samborabora »

Offline fiesty

  • Semi-Newbie
  • *
  • Posts: 14
Re: Board Icons
« Reply #52 on: August 15, 2014, 04:29:00 AM »
cant get the images to show ?

being a noob at all this stuff, i struggle to get things up and running at times (most of the time actually  :-[ )

so for anyone like me who has had/having problems getting the images to show using this mod, maybe this will help :)

i had been trying to get this mod up and running for quite a while, the problem was that the images would not show up on the forum. instead of the image, i was getting a line of text like "no new posts" instead,

after several uninstalls and reinstalling the mod, and trying all the advice from this thread, without getting any nearer to solving it,

one bit of advice was to try and trace the route of the image to see if this was the problem,
it wasn't, the images were where they were supposed to be,  but it did provide the clue to where the problem lay,
as attempting to view the image got a error stating it could not be viewed as the image "had errors"

so i checked the images i had on the computer that i chosen for the boards, which all seemed to be ok,

but after downloading them back from the server to a folder on the desktop, and trying to view them again, they were indeed corrupt!
this pointed at this happening during the transfer to the server,
(i use Filezilla for the uploading of files to the server)

the more adept users here will probably have worked out the problem by now :)

anyhow, it seems that i had the transfer type set as "auto" on filezilla,
from a choice of ASCII/AUTO/BINARY,  and i seemed to remember something about using binary transfer for some types of file,
so i reset the type to binary, and reloaded the images, and gave it another go,

and success! the images were now showing as they were supposed to :)

in my case this solved the problem, so i hope this may help any fellow noobs to get this working :)

thanks for a great mod, it has certainly made our forum look a lot better for users :)

p:s this also worked for the rss feed icon mod too, which worked ok in default and core themes, but not on other themes, it was the "binary" bit again  ::)

Offline SoLoGHoST

  • SMF Hero
  • ******
  • Posts: 1,796
  • Gender: Male
  • Real coders do not need to comment their code!
    • Dream Portal
Re: Board Icons
« Reply #53 on: August 15, 2014, 11:29:45 PM »
Great, glad you got it working.  Yes Binary Mode in Filezilla will be sure to transfer your files correctly.  Anytime I backup file, I always transfer them in binary mode.

Cheers :)

Offline Joomlamz

  • SMF Hero
  • ******
  • Posts: 2,628
  • Gender: Male
  • Suporte SmfPT
    • apllicmz on Facebook
    • apllicmz on GitHub
    • https://www.linkedin.com/in/aplic on LinkedIn
    • @aplichosting on Twitter
    • Webdesign
Re: Board Icons
« Reply #54 on: October 08, 2014, 09:05:39 AM »
Good Mod
when update dont forget portuguese files

Code: [Select]
<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
//
// Board Icons MOD Begin...Translte by Candidosa2
//

$txt['boardIcons_newPostsPath'] = 'Novos Postes Caminho da Imagem: ';
$txt['boardIcons_noNewPostsPath'] = 'N&atilde;o h&aacute; poste do Caminho da Imagem: ';
$txt['boardIcons_redirectPostsPath'] = 'Redirecionar Caminho da Imagem: ';
$txt['boardIcons_manage_caption'] = 'Deixe em branco para a imagem padr&atilde;o.';

// Filepath Selection Choices...
$txt['boardIcons_select_http'] = 'http://';
$txt['boardIcons_select_boardurl'] = '{$boardurl}';
$txt['boardIcons_select_scripturl'] = '{$scripturl}';
$txt['boardIcons_select_default_theme'] = 'Tema padr&atilde;o';
$txt['boardIcons_select_theme'] = 'Este tema';

//
// Board Icons MOD END! sUPPORT BY SMFPT.NET
//
]]></add>
        </operation>
    </file>



Offline Bob La Londe

  • Semi-Newbie
  • *
  • Posts: 49
Re: Board Icons
« Reply #55 on: October 31, 2014, 01:16:16 PM »
I installed this mod on three different 2.0.9 boards and it seemed to work just fine on all of them. 

The only issue I see right now, is that I would like to have an option to change and/or turn off the icon legend at the bottom of the screen. 

Offline Cylent1

  • Semi-Newbie
  • *
  • Posts: 46
    • Drummer Underground
Re: Board Icons
« Reply #56 on: November 01, 2014, 02:13:02 AM »
I installed this mod on three different 2.0.9 boards and it seemed to work just fine on all of them. 

The only issue I see right now, is that I would like to have an option to change and/or turn off the icon legend at the bottom of the screen.

I am running this mod in 2.0.9 also, I cannot seem to get this to work either.
I'm glad there is confirmation of this working in this release of smf.
What files did you have to edit to get this to work?
did you run in emulation mode?
any advice to get this to work?

Offline Dream Portal Team

  • Semi-Newbie
  • *
  • Posts: 89
    • Dream Portal
Re: Board Icons
« Reply #57 on: November 02, 2014, 10:36:56 PM »
I don't understand why people are reporting any problems with this mod.  This mod works flawlessly in every version I have tested.  I have just tested it now in 2.0.9 and works a charm.
This is the universal account for the Dream Portal Team. All messages sent to this account will be discarded.  Please visit us at:  Dream Portal dot net for support and extensions to Dream Portal.

Offline Cylent1

  • Semi-Newbie
  • *
  • Posts: 46
    • Drummer Underground
Re: Board Icons
« Reply #58 on: November 04, 2014, 06:00:24 PM »
I was able to get it running with no problems by flushing the cache in forum settings, and also using the correct path format in the plugin settings.  Hope this helps a little bit...

Offline valter071

  • Semi-Newbie
  • *
  • Posts: 55
Re: Board Icons
« Reply #59 on: November 08, 2014, 02:25:54 PM »
I don't understand why people are reporting any problems with this mod.  This mod works flawlessly in every version I have tested.  I have just tested it now in 2.0.9 and works a charm.

If you can, have someone make a step by step what can be done to work out and everyone would be happy and would not be asking unnecessary questions as well as the same is not working ...