News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

BoardHover Mod

Started by butchs, January 28, 2008, 06:03:27 PM

Previous topic - Next topic

S3NTYN3L

Quote from: eNOOBz on March 29, 2008, 01:34:53 AM
What should I do?.. please help.

Reading this thread might be a good start...


Quote from: butchs on March 08, 2008, 09:27:20 PM
Making this mod to work with every other mod is impossible.  Your best bet is a manual install.


I suggest that you uninstall your mods, one at a time, until the install for this mod works...
You can then try reinstalling the unstalled mods...

Although, I've a feeling that you'll need to manually install one or more of them regardless...

butchs

#21
As usual, thanks S3NTYN3L. :)

Anyhow, version 1.2 was submitted today.  No additional features were added.  But now, it is compatible with both 1.1.4 and 2.0 Beta 3 public.  I streamlined some of the 1.1.4 code, fixed a minor typo.  But I spent more effort streaming code for 2.0 beta 3.  I do not plan to do any further streamlining with 1.1.4 sorry...   :o

If there is another mod that changes the same code it may not be fully functional with BoardHover and will require manual editing.  If you install BoardHover first then install the other mod editing may be required...   Here are the places to look:

MessageIndex.template.php for 2.0 Beta with BoardHover  1.2 installed the code in blue below should be reviewed:

Quote<td class="windowbg2 windowbg2_hover" valign="middle" width="22%" onclick="window.location.href=\'',$board['last_post']['href'],'\'"><small>
               <b>', $txt['last_post'], '</b> ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
               ', $txt['smf88'], ' ', $board['last_post']['link'], '<br />
               ', $txt[30], ' ', $board['last_post']['time'];

         else
            echo '
            <td class="windowbg2" valign="middle" width="22%">

In BoardIndex.template.php for 2.0 Beta with BoardHover  1.2 installed the following blue lines need to be reviewed:

Quote<td class="windowbg2 windowbg2_hover" valign="middle" width="22%" onclick="window.location.href=\'',$board['last_post']['href'],'\'">
               <span class="smalltext">

                  <b>', $txt['last_post'], '</b>  ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
                  ', $txt['in'], ' ', $board['last_post']['link'], '<br />
                  ', $txt['on'], ' ', $board['last_post']['time'];
            else
               echo '
            <td class="windowbg2" valign="middle" width="22%">


There may be a easier way but I ran out of coding time...  I hope you enjoy the update.  8)
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

DASBEAN

Am I supposed to replace "default" in the package-info.xml with the name of the theme, or the file name of theme? For example, the Corto theme is named corto112_tp on the file system.

Please advise.

Thanks

butchs

I doubt that will work since other themes may be not be the same as default.  I think you are going to have to try a manual install!  O:)

Why don't you try the SMF Package Parser?  I never tried but who knows.... ???
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

icon

#24
first of all, thnx for this mod..

got a little problem here,

this was your modified boardindex.template.php (boardhover mod) right?
/* Each board in each category's boards has:
new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
children (see below.), link_children (easier to use.), children_new (are they new?),
topics (# of), posts (# of), link, href, and last_post. (see below.) */
foreach ($category['boards'] as $board)
{
echo '
<tr>
<td ' , !empty($board['children']) ? 'rowspan="2"' : '' , ' class="windowbg" width="6%" align="center" valign="top"><a href="', $scripturl, '?action=unread;board=', $board['id'], '.0">';

// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// This board doesn't have new posts, but its children do.
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';

echo '</a>
</td>
<td class="windowbg2 windowbg2_hover" onclick="window.location.href=\'index.php?board=',$board['id'],'.0\'">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];

// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<div style="padding-top: 1px;" class="smalltext"><i>', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '</i></div>';

// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="windowbg" valign="middle" align="center" style="width: 12ex;"><span class="smalltext">
', $board['posts'], ' ', $txt[21], ' <br />
', $board['topics'],' ', $txt[330], '
</span></td>';
/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */

if (!empty($board['last_post']['id']))
echo '
<td class="windowbg2 windowbg2_hover" valign="middle" width="22%" onclick="window.location.href=\'',$board['last_post']['href'],'\'">
<span class="smalltext">

<b>', $txt[22], '</b>  ', $txt[525], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['smf88'], ' ', $board['last_post']['link'], '<br />
', $txt[30], ' ', $board['last_post']['time'];
else
echo '
<td class="windowbg2" valign="middle" width="22%">
<span class="smalltext">';
echo '
</span>
</td>
</tr>';


I installed Neat Board Layout and it camed up with this code.
My problem is how would I apply your board hover to to work on this code?
/* Each category in categories is made up of:
id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
and boards. (see below.) */
$first = true;
foreach ($context['categories'] as $category)
{
echo '
<div class="tborder" style="margin-top: ' , $first ? '0;' : '1ex;' , '' , $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' : '', '">
<div class="catbg', $category['new'] ? '2' : '', '" style="padding: 5px 5px 5px 10px;">';
$first = false;

// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<a href="', $category['collapse_href'], '">', $category['collapse_image'], '</a>';

echo '
', $category['link'], '
</div>';

// Assuming the category hasn't been collapsed...
if (!$category['is_collapsed'])
{
echo '
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;"> 
<tr> 
<td class="windowbg" valign="middle"></td> 
<td class="windowbg2" valign="middle" align="left"><b>', $txt['smf82'], '</b></td> 
<td class="windowbg" valign="middle" align="center"><b>', $txt[22], '</b></td> 
<td class="windowbg2" valign="middle" align="center"><b>', $txt[330], '</b></td> 
<td class="windowbg" valign="middle" align="center"><b>', $txt[21], '</b></td> 
</tr>
';

/* Each board in each category's boards has:
new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
children (see below.), link_children (easier to use.), children_new (are they new?),
topics (# of), posts (# of), link, href, and last_post. (see below.) */
foreach ($category['boards'] as $board)
{
echo '
<tr>
<td ' , !empty($board['children']) ? 'rowspan="2"' : '' , ' class="windowbg" width="6%" align="center" valign="top"><a href="', $scripturl, '?action=unread;board=', $board['id'], '.0">';

// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// This board doesn't have new posts, but its children do.
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';

echo '</a>
</td>
<td class="windowbg2 windowbg2_hover" onclick="window.location.href=\'index.php?board=',$board['id'],'.0\'">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];

// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<div style="padding-top: 1px;" class="smalltext"><i>', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '</i></div>';


echo '
</td>
<td class="windowbg2" valign="middle" width="22%">
<span class="smalltext">';

/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))

echo '
<b><img src="', $board['last_post']['icon_url'], '" /> ', $board['last_post']['link'], '</b> <br />
', $txt[525], ' ', $board['last_post']['member']['link'], ' <br />
<div align="right"> ', $board['last_post']['time'] , ' </div>';
echo '
</span>
</td>';

// Show some basic information about the number of posts, etc.
echo '
<td class="windowbg2" valign="middle" align="center" style="width: 6ex;"><span class="smalltext">', $board['topics'], '</span></td>
<td class="windowbg" valign="middle" align="center" style="width: 6ex;"><span class="smalltext">', $board['posts'], '</span></td>
</tr>';

butchs

It looks like installing "Neat Board Layout" first then manually installing BoardHover does the trick.  8)
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

exxocet

#26
Installed this great mod manually, as I use Dilber theme. Everything's working fine, just it changed the fonts in Internet Explorer. It effects only IE 7, possible the anterior versions too; works OK in Opera and Firefox. It thought is a CSS problem, but I've used back-up CSS and still the fonts remain changed. Some help please?...  O:)





butchs

#27
Looks good.

The mod only effects the graphics unless you change the "font-family" for the hovers in css or define the text in the class in php text.

When I was testing my site with IE I noticed that IE can override the fonts.  I would start looking at your IE preferences.

Otherwise I would need more info.  :)
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Jelle Mees

*     1.     Execute Modification     ./Themes/default/index.template.php     Test successful
      1.    Replace    ./Themes/default/index.template.php    Test successful
      2.    Replace    ./Themes/default/index.template.php    Test successful
      3.    Add Before    ./Themes/default/index.template.php    Test successful
*    2.    Execute Modification    ./Themes/default/MessageIndex.template.php    Test failed
      1.    Replace    ./Themes/default/MessageIndex.template.php    Test successful
      2.    Replace    ./Themes/default/MessageIndex.template.php    Test failed
      3.    Add After    ./Themes/default/MessageIndex.template.php    Test successful
      4.    Replace    ./Themes/default/MessageIndex.template.php    Test successful
      5.    Replace    ./Themes/default/MessageIndex.template.php    Test successful
      6.    Replace    ./Themes/default/MessageIndex.template.php    Test successful
*    3.    Execute Modification    ./Themes/default/BoardIndex.template.php    Test failed
      1.    Replace    ./Themes/default/BoardIndex.template.php    Test successful
      2.    Replace    ./Themes/default/BoardIndex.template.php    Test failed
*    4.    Execute Modification    ./Themes/default/PersonalMessage.template.php    Test successful
      1.    Replace    ./Themes/default/PersonalMessage.template.php    Test successful
*    5.    Execute Modification    ./Themes/default/style.css    Test successful
      1.    Add Before    ./Themes/default/style.css    Test successful
      2.    Add Before    ./Themes/default/style.css    Test successful
      3.    Add After    ./Themes/default/style.css    Test successful
      4.    Add After    ./Themes/default/style.css    Test successful
      5.    Add After    ./Themes/default/style.css    Test successful
   6.    Extract File    ./Themes/default/scripts/pseudo-hover.htc

butchs

#29
Assuming SMF 2.0 Beta 3.x.  Boardhover mod assumes you have a fresh default theme.   It looks like you have a mod installed that is conflicting.  In some cases you can uninstall the conflicting mod and reinstall boardhover and all will work fine.  Other cases require a manual install.

For example the report shows that in "MessageIndex.template.php" the following default code has been altered:
</td>
<td class="windowbg2" valign="middle" width="22%"><small>';

/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<b>', $txt['last_post'], '</b> ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'];

echo '</small>



If it was not edited boardhover mod would replace it with the following:
</td>';

/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<td class="windowbg2 windowbg2_hover" valign="middle" width="22%" onclick="window.location.href=\'',$board['last_post']['href'],'\'"><small>
<b>', $txt['last_post'], '</b> ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['smf88'], ' ', $board['last_post']['link'], '<br />
', $txt[30], ' ', $board['last_post']['time'];

else
echo '
<td class="windowbg2" valign="middle" width="22%"><small>';

echo '</small>


That are so many mods out there that I do not know which one is conflicting.   As a mod author it is impossible for me to guess what other mod authors will do.  Even if I did there is no method for me to incorporate AI into the installation script.  All I can do is minimize the code I search for in the hope of not conflicting.

If you like to try a manual install check out some of the previous topics in this thread.  If you run into a snag post the code in question and I will try to help. But please note that my time is limited so it may take me a few days to respond...
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

gianko82

is it possible apply this mod only to the board index, and only in the left part on the index of the board and not over the right part regarding the latest post?
Also, I have some images on the board description, which change with a hover condition (see them on www.sicilsurf.it/joomla/smf ) is it possible make these change with the hover image when I am over the board index?
thanks

butchs

Quote from: gianko82 on June 05, 2008, 05:34:41 AM
is it possible apply this mod only to the board index

Yes.  You will have to manually install the mod and skip the following sections in the xml file:  MessageIndex.template.php & PersonalMessage.template.php.

See an earlier post in this thread on how to do a manual install.

Quote from: gianko82 on June 05, 2008, 05:34:41 AM
and only in the left part on the index of the board and not over the right part regarding the latest post?


Yes.  Manually install half the code for BoardIndex.template.php  "<td class="windowbg2">
               <b>..".  Ignore the second change in this file.

Quote from: gianko82 on June 05, 2008, 05:34:41 AM
Also, I have some images on the board description, which change with a hover condition (see them on www.sicilsurf.it/joomla/smf ) is it possible make these change with the hover image when I am over the board index?
thanks

Yes.  In style.css under "#menu ul li a"  you can add a hover image.  For example:

#menu ul li a
{
bla bla...
   background: #8FC1FB url(./images/menubg_current.png) repeat; /* baby blue */

}

Will add the base background image.

"#menu #selected a"  will set the background for the last item that was clicked on.  "#menu ul li a:hover" will set the hover image.

I recommend adding both a solid color and an image since some browsers turn off the image.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

gianko82

#32
sorry.... but I don't understand very well!
what's "#menu ul li a"??
also, did you see my forum board index?
I wnat to say that the images relative to each section - in the section's description - (on the right) have to change with the related over images that are on my forum - which are different from section to section! - when I am over the section rectangle...
I don't know if I explain good myself! did you understand?
is it possible?

butchs

#33
Quote from: gianko82 on June 05, 2008, 12:05:14 PM
what's "#menu ul li a"??

"#menu ul li a" is in the "style.css" file that is in your default directory.

Quote from: gianko82 on June 05, 2008, 12:05:14 PM
also, did you see my forum board index?

Yes.  It is nice.

Quote from: gianko82 on June 05, 2008, 12:05:14 PM
I wnat to say that the images relative to each section - in the section's description - (on the right) have to change with the related over images that are on my forum - which are different from section to section! - when I am over the section rectangle...

Boardhover is used to change the background for theboards.  Changing the images on hover is not in the scope of board hover.

I have been tinkering with it on my forum at ECRTcc.com

If you run the mouse over replay and Quote they will change state.  But I have not made it into a mod.  It is Car Show season...

Quote from: gianko82 on June 05, 2008, 12:05:14 PM
is it possible?

Yes.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

weightman

Hi, I would really like to install this mod but I have many other mods installed and this mod therefore shows errors on install index.template.php and style.css. I looked at the code using the package parser and the code being searched for is simply different. Would anyone be willing to talk me in to inserting the code properly if I post each issue (2-3)?

Thanks

fangweile

You have to manually edit the index.template.php and style.css. What theme did you used?

weightman

Yes, I realize I need to make the edits manually. But, for instance, the second edit necessary for index.template php says replace this code:

<body>';

But, that code does not appear in my code. Instead, I have this code:

<body><table width="100%">
    <tr>
        <td class="mainCell">';
   

Most of the edits are doable, but their are a couple more that don't match up like this one.

Thanks

fangweile

Find

<body>

Replace with

<body onload="PreloadFlag = true;">

butchs

New version bug fix posted for SMF 2.0 beta 3 users only.  This version fixes a minor Undefined Offset that was showing up in the administrator's error log.  See the mod for more info. 

No changes were made for SMF 1.1.x users.

Please uninstall the old version and install the new version.  8)
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

edi67

CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Advertisement: