vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Forum Home Enhancements - Forum Category Icons (Advanced) (https://vborg.vbsupport.ru/showthread.php?t=244351)

linkooz 01-09-2014 02:19 PM

Quote:

Originally Posted by Slipperyduck (Post 2452583)
vBulletin 4.2.2

When in the Admin panel I get the following:


Warning: Function eregi() is deprecated in ..../adminpanel/forum.php(248) : eval()'d code on line 12

^ I get one Warning for every icon created, ie. I have 19 Warnings and have 19 custom Icons

----------------------------------------------------------------------------------------------------------------------------------
I'm assuming its the Plugin Template : Forum Category Icons [Forum Manager Edit]

if($image != ".." && $image != "." && $image != "lock.png" && (eregi('\.(jpg|gif|png)$', $image)))

^ where the eregi function is depreciated?

I've changed mine to the following and it seems to work (I'm assuming - don't see a problem yet):

if($image != ".." && $image != "." && $image != "lock.png" && (preg_match('/\.(jpg|gif|png)$/i', $image)))


I am still getting the same error..

Warning: asort() expects parameter 1 to be array, null given in ..../admincp/forum.php(248) : eval()'d code on line 21

Warning: Invalid argument supplied for foreach() in ..../admincp/forum.php(248) : eval()'d code on line 22

could anybody help me out?

Thanks.

Big-Pete 01-10-2014 12:55 PM

Quote:

Originally Posted by Slipperyduck (Post 2452583)
vBulletin 4.2.2

When in the Admin panel I get the following:


Warning: Function eregi() is deprecated in ..../adminpanel/forum.php(248) : eval()'d code on line 12

^ I get one Warning for every icon created, ie. I have 19 Warnings and have 19 custom Icons

----------------------------------------------------------------------------------------------------------------------------------
I'm assuming its the Plugin Template : Forum Category Icons [Forum Manager Edit]

if($image != ".." && $image != "." && $image != "lock.png" && (eregi('\.(jpg|gif|png)$', $image)))

^ where the eregi function is depreciated?

I've changed mine to the following and it seems to work (I'm assuming - don't see a problem yet):

if($image != ".." && $image != "." && $image != "lock.png" && (preg_match('/\.(jpg|gif|png)$/i', $image)))

Where did you edit this? Only I cannot find a Forum Icons Template to edit..?

Had a blonde moment..! all done, confusing this with a WP plugin for another site :(

g10net 01-27-2014 07:33 PM

thanks

Tibiaspy 02-06-2014 10:13 PM

Everything works fine except one thing:

https://vborg.vbsupport.ru/external/2014/06/29.jpg

The upper part is what I should get, the lower part is what I get. I see information about users viewing thread in wrong place - it should be right beside forum title instead it's in front of description.

Anyone have any idea what to do?

Chris-Moody 02-25-2014 04:34 PM

Works Great once I figured out the settings...

Krusty1231 02-28-2014 08:22 AM

1 Attachment(s)
Quote:

Originally Posted by Tibiaspy (Post 2479420)
Everything works fine except one thing:

https://vborg.vbsupport.ru/external/2014/06/29.jpg

The upper part is what I should get, the lower part is what I get. I see information about users viewing thread in wrong place - it should be right beside forum title instead it's in front of description.

Anyone have any idea what to do?

I have the same issue. I did install the css-sprites to my forum, and then it happened.

Can anyone tell me what to move to get it to show correctly?

THanks in advance for any replies.

Bluefin221 03-02-2014 12:26 AM

Quote:

Originally Posted by Disco_Stu (Post 2352143)
Here are my changes. I suggest you make a copy of your original code first as I am not responsible for any changes to your forums you make.

To display the sub forum icons:

Styles & Templates>Search In Templates>forumhome_subforums

Look for this line of code:

Code:

<a href="{vb:link forum, {vb:raw row}}">{vb:raw row.title}</a>{vb:raw row.comma}
and replace it (comment it out - I don't like to hard delete) with this code:

Code:

<br>
<div style="width:65px;">
<center><a href="{vb:link forum, {vb:raw row}}"><img src="images/{vb:raw vboptions.forumiconimg_folder}/{vb:raw row.forumiconimg}" /><br>{vb:raw row.title}</a></center>
</div>

That's all there is to it. Note that I left off the comma between subforums. If you want that then include "{vb:raw row.comma}" after "</a>". Also I included a <div> to control the width of the icon display and a <center> to center the title below the icon.

I also added a line break at the top of forumhome_subforums to add a line between the forum and sub forums.

If you want to control how many subforums are displayed on each line (I limit it to 4) then do this:

At the top of forumhome_subforums add this:

Code:

<script type="text/javascript">
var counter = 0;
</script>



Then after this line of code

Code:

<vb:each from="subforums" value="row">
add this:

Code:

<script type="text/javascript">
  counter = counter + 1;
  if(counter >4)
    {
      counter = 1;
      document.write("<br>");
    }
 
</script>

I also have some spacing code in the above code to move the sub forums to the right a bit but that's really up to you how you want to position the icons.

If you want to get rid of the "Sub-Forum" heading then comment out or delete this line of code at the top of forumhome_subforums:

Code:

<h4 class="subforumlistlabel">{vb:rawphrase subforums}:</h4>



To add the forum or sub forum icon at the top of a thread do this:

Styles & Templates>Search In Templates>FORUMDISPLAY

after "{vb:raw navbar}" add this line of code:

Code:

<img src="images/{vb:raw vboptions.forumiconimg_folder}/{vb:raw foruminfo.forumiconimg}" />
And that's all there is to it.

This just will not work for me, I do have vsa sub forum manager as a mod and I read somewhere this mod wont work with it in sub forums, my main forums are perfect however sub forums I cannot get any icons to show at all. If I disable the VSA sub forum manager its just a complete mess.

Tibiaspy 04-02-2014 05:35 PM

Quote:

Originally Posted by Krusty1231 (Post 2484240)
I have the same issue. I did install the css-sprites to my forum, and then it happened.

Can anyone tell me what to move to get it to show correctly?

THanks in advance for any replies.

Good to know I'm not the only one. Have you figured it out may be?

sevenmix 04-10-2014 04:37 AM

Quote:

Originally Posted by onespot (Post 2407107)
Hey All,
So I wanted to use this but when you had a Category > Category > Subforum layout the images would not properly showup (actually they wouldn't at all).

There was a post on "how to fix it" but then my problem was that the images were not correctly displaying.

I spent 3-4 hours fixing it (should have been easy but hey im not coder) so if anyone needs - just update your forumhome_forumbit_level1_post template and have it look like this. Should work for default template - I had to go in and copy the code from his XML to figure it out.

It would be nice if you could add this in so subforums would properly work out of the box.

Code:

<li id="forum{vb:raw forum.forumid}" class="forumbit_post {vb:raw forum.statusicon} L1">
<vb:if condition="THIS_SCRIPT != 'forumdisplay'">
                <div class="forumhead L1">
                        <h2>
                                <span class="forumtitle">&nbsp;</span>
                                <span class="forumthreadpost">{vb:rawphrase threads_posts}&nbsp;</span>
                                <span class="forumlastpost">{vb:rawphrase last_post}</span>
                        </h2>
                </div>
</vb:if>
<div class="forumbit_post L2">
        <div class="forumrow">
                <div class="foruminfo">
<img src="{vb:stylevar imgdir_statusicon}/{vb:raw forum.imageprefix}forum_{vb:raw forum.statusicon}-48.png" class="forumicon" id="forum_statusicon_{vb:raw forum.forumid}" alt="" />
                        <div class="forumdata">
                                <div class="datacontainer">
                                        <vb:if condition="$vbulletin->options['forumiconimg_enabled'] && $forum['forumiconimg'] && $vbulletin->options['forumiconimg_location'] != '1'">
                                                <vb:if condition="$vbulletin->options['forumiconimg_location'] == '0'">
                                                <!-- category icon after status icon -->
                                                <img src="images/{vb:raw vboptions.forumiconimg_folder}/{vb:raw forum.forumiconimg}" style="float:left; display:inline-block;" alt="" border="0" />
                                                <vb:else />
                                                <!-- replace status icon with category icon -->
                                                <img src="images/{vb:raw vboptions.forumiconimg_folder}/{vb:raw forum.forumiconimg}" style="float:left; display:inline-block; top:{vb:raw vboptions.forumiconimg_top} {vb:raw vboptions.forumiconimg_size}" class="forumicon" id="forum_statusicon_{vb:raw forum.forumid}" alt="{vb:raw forum.title}" <vb:if condition="$vbulletin->options['forumiconimg_status'] && $forum['statusicon'] == 'old'">style="opacity:0.5; -moz-opacity:.50; -ms-filter:?alpha(opacity=50)?; filter:alpha(opacity=50);"</vb:if> />
                                                </vb:if>
                                        <vb:else />
                                                <!-- do nothing -->
                                                <img src="{vb:stylevar imgdir_statusicon}/{vb:raw forum.imageprefix}forum_{vb:raw forum.statusicon}-48.png" class="forumicon" id="forum_statusicon_{vb:raw forum.forumid}" alt="" />
                                        </vb:if>
                                        <div class="titleline">
                                                <a href="{vb:link forum, {vb:raw forum}}" style="font-size:13px; font-weight:bold;">{vb:raw forum.title}</a>
                                                <vb:if condition="$show['browsers']"><span class="viewing">({vb:raw forum.browsers} {vb:rawphrase viewing})</span></vb:if>
                                        </div>
                                        <vb:if condition="$show['forumdescription']"><p>{vb:raw forum.description}</p></vb:if>
                                        <vb:if condition="$vboptions['showmoderatorcolumn'] AND $forum['moderators']">
                                                <div class="moderators">
                                                        <h4>{vb:rawphrase moderators}:</h4>
                                                        <ol class="commalist">
                                                                <vb:each from="forum.moderators" value="row">
                                                                        <li><a class="username" href="{vb:link member, {vb:raw row}}">{vb:raw row.musername}</a>{vb:raw row.comma}</li>
                                                                </vb:each>
                                                        </ol>
                                                </div>
                                        </vb:if>
                                        <vb:if condition="$show['subforums']">
                                                {vb:raw forum.subforums}
                                        </vb:if>
                                </div>
                        </div>
                </div>
                <vb:if condition="$forum['statusicon'] != 'link'">
                        <h4 class="nocss_label">{vb:rawphrase forum_actions}:</h4>
                        <ul class="forumactionlinks td">
                        <vb:if condition="$forum['allowposting']">
                                <vb:if condition="$show['externalrss']">
                                        <li class="forumactionlink rsslink"><a href="external.php?{vb:raw session.sessionurl}type=RSS2&amp;forumids={vb:raw forum.forumid}" title="{vb:rawphrase view_forum_rss_feed}">{vb:rawphrase view_forum_rss_feed}</a></li>
                                </vb:if>
                                <vb:if condition="$show['member']">
                                        <vb:if condition="$show['forumsubscription']">
                                                <li class="forumactionlink unsubslink"> <a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}subscription.php?{vb:raw session.sessionurl}do=removesubscription&amp;f={vb:raw forum.forumid}" title="{vb:rawphrase unsubscribe_from_this_forum}">{vb:rawphrase unsubscribe_from_this_forum}</a></li>
                                        <vb:else />
                                                <li class="forumactionlink subslink"> <a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}subscription.php?{vb:raw session.sessionurl}do=addsubscription&amp;f={vb:raw forum.forumid}" title="{vb:rawphrase subscribe_to_this_forum}">{vb:rawphrase subscribe_to_this_forum}</a></li>
                                        </vb:if>
                                </vb:if>
                        </vb:if>
                        </ul>
                        <h4 class="nocss_label">{vb:rawphrase forum_statistics}:</h4>
                        <ul class="forumstats_2 td">
                                <li>{vb:rawphrase threads}: {vb:raw forum.threadcount}</li>
                                <li>{vb:rawphrase posts}: {vb:raw forum.replycount}</li>
                        </ul>
                        <div class="forumlastpost td">
                                <h4 class="lastpostlabel">{vb:rawphrase last_post}:</h4>
                                <div>
                                        {vb:raw forum.lastpostinfo}
                                </div>
                        </div>
                </vb:if>
        </div>
        <vb:if condition="$childforumbits">
                <ol id="childforum_for_{vb:raw forum.forumid}" class="childsubforum">
                        {vb:raw childforumbits}
                </ol>
        </vb:if>
</div>
</li>


Thanks, this worked for me :)

sevenmix 04-10-2014 05:02 AM

Quote:

Originally Posted by Disco_Stu (Post 2352143)

To add the forum or sub forum icon at the top of a thread do this:

Styles & Templates>Search In Templates>FORUMDISPLAY

after "{vb:raw navbar}" add this line of code:

Code:

<img src="images/{vb:raw vboptions.forumiconimg_folder}/{vb:raw foruminfo.forumiconimg}" />
And that's all there is to it.

Hi

This works great thanks, but i have a little problem, on categorys there are no icons, so it appears an invalid one, like this:

https://vborg.vbsupport.ru/external/2014/04/35.png

Do you know a solution for that?


All times are GMT. The time now is 08:14 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01606 seconds
  • Memory Usage 1,817KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete