The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Second Homepage Message Box?

View previous topic View next topic Go down

Solved Second Homepage Message Box?

Post by Castellana on June 30th 2015, 12:15 am

Hello! Hello

Is there a way to have a second Homepage Message box on my main forum page?

I'd like to have a second one, much further down on the page.

My forum is: http://cvas.forumotion.com/
Version: phpBB2

Thanks for any help.

Castellana
Forumember

Female Posts : 282
Reputation : 5
Language : english

http://cvas.forumotion.com/portal

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by brandon_g on June 30th 2015, 2:06 am

Hello,

What precisely do you mean by a second one? Just to clarify you mean the homepage message that appears at the top of the homepage correct?

-Brandon


Remember to mark your topic when a solution is found.

brandon_g
Support Moderator
Support Moderator

Male Posts : 5344
Reputation : 488
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by Castellana on June 30th 2015, 2:49 pm

Yes, Brandon, that's what I mean. Right now, if you look at my forum, you'll see a row of five photos at the top. That is the content of my homepage message box.

What I want to do is add ANOTHER row of photos further down on the forum, between two of the Categories.

It does not have to be a "Homepage Message" box as such, just a way for me to add another row of photos. I will accept any way of doing it, even a widget, that would be fine, if there was a way to add it where I want it.

Hope this explains it. Very Happy

Castellana
Forumember

Female Posts : 282
Reputation : 5
Language : english

http://cvas.forumotion.com/portal

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by brandon_g on June 30th 2015, 3:04 pm

Ah now I see. Yeah something like that should definitelly be possible. Maybe @Ange Tuteur or @JScript can use their wickedly awesome coding skills to make something for you. Smile

-Brandon


Remember to mark your topic when a solution is found.

brandon_g
Support Moderator
Support Moderator

Male Posts : 5344
Reputation : 488
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by Castellana on June 30th 2015, 4:46 pm

I am hoping this will be true! sunny

Castellana
Forumember

Female Posts : 282
Reputation : 5
Language : english

http://cvas.forumotion.com/portal

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by Castellana on July 4th 2015, 6:19 pm

Bumping this in the hopes I can get a solution. I simply want to add more photos to the forum page, displaying in a row, preferably between two categories.

The row of photos should be the same length as the current Homepage Message box, so that everything will be neat and tidy.

Any help with this would be greatly appreciated. Very Happy

Castellana
Forumember

Female Posts : 282
Reputation : 5
Language : english

http://cvas.forumotion.com/portal

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by brandon_g on July 9th 2015, 5:36 pm



Remember to mark your topic when a solution is found.

brandon_g
Support Moderator
Support Moderator

Male Posts : 5344
Reputation : 488
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by APE on July 9th 2015, 6:25 pm

Please @brandon_g please do not bump other members posts with a tag to a member of staff as some members of staff may not have the time to make that code for that member but some one else may do.

if some one has a way around this they will see it and post




APE
Manager
Manager

Male Posts : 8598
Reputation : 748
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by Ange Tuteur on July 9th 2015, 6:52 pm

Hi @Castellana,

You can try the following if you like. Go to Module > JS codes management > Create a new script

Placement : In the homepage
Code:
$(function() {
  var content = 'Hello !',
     
  main = document.getElementById('page-body');
 
  $('.homebox', main).next().next().after('<table class="homebox" border="0" cellpadding="0" cellspacing="1" width="100%"><tbody><tr><td class="row1" rowspan="3" align="center" valign="middle"><div class="gensmall">' + content + '</div></td></tr></tbody></table>');
});

At the top of the script is the content variable. Insert whatever you want there. Smile

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by Castellana on July 10th 2015, 2:42 am

Thanks! That is what I was hoping for. Very Happy
I have two further questions.

1. How can I place the "box" where I want on the forum? I'd like it to be after "Area Fish Stores," which is the last Category that members and guests see.

2. Here is my content. How do I get a space between the two photos?
var content =:
<div style="margin:auto;text-align:center;width:100%">
<br />
<div style="display:inline-block">
<img src="https://i18.servimg.com/u/f18/16/84/25/68/360_ch10.png" /> <img src="https://i18.servimg.com/u/f18/16/84/25/68/360_li10.jpg" /> <br /><br />
</div>

</div>


Thank you so much for all your help already!

Castellana
Forumember

Female Posts : 282
Reputation : 5
Language : english

http://cvas.forumotion.com/portal

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by Ange Tuteur on July 10th 2015, 10:38 am

You can try the following script. It should add it after the last category.
Code:
$(function() {
  var content = 'Hello !',
   
  main = document.getElementById('page-body');
 
  $('.homebox', main).parent().find('> IMG:last').after('<table class="homebox" border="0" cellpadding="0" cellspacing="1" width="100%"><tbody><tr><td class="row1" rowspan="3" align="center" valign="middle"><div class="gensmall">' + content + '</div></td></tr></tbody></table>');
});

Replacing the space with &nbsp; should separate the images.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by Castellana on July 10th 2015, 2:09 pm

This is working brilliantly! ~1~ Spacing and placement are just as I wanted. Thanks!

Just one more question, if you don't mind!

I tried to place a line of explanatory type (captions) over the images - using the same sort of code that I would use in a widget - but it didn't work. What happened instead is that the entire "homebox" became invisible.

Is there a way to place a cpation either over or under the images?

Castellana
Forumember

Female Posts : 282
Reputation : 5
Language : english

http://cvas.forumotion.com/portal

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by Castellana on July 13th 2015, 4:08 pm

Bump! Very Happy For how to add captions, only. See my last post, above.
Thanks!

Castellana
Forumember

Female Posts : 282
Reputation : 5
Language : english

http://cvas.forumotion.com/portal

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by Ange Tuteur on July 13th 2015, 4:29 pm

Sorry for the late reply. Do you mean the text that displays when you hover of the image, or text that's directly above the image regardless of your mouse position ?

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by Castellana on July 13th 2015, 4:46 pm

Very Happy Thanks for replying!
I meant text that's directly above the image regardless of the mouse position. And I would need to be able to edit the text from time to time.

Castellana
Forumember

Female Posts : 282
Reputation : 5
Language : english

http://cvas.forumotion.com/portal

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by Ange Tuteur on July 13th 2015, 6:07 pm

Try this :
Code:
$(function() {
  var content = '<table><tr><td>TEXT</td><td>TEXT</td><td>TEXT</td></tr><tr><td><img src="/IMAGE" alt="IMAGE"/></td><td><img src="/IMAGE" alt="IMAGE"/></td><td><img src="/IMAGE" alt="IMAGE"/></td></tr></table>',
 
  main = document.getElementById('page-body');
 
  $('.homebox', main).parent().find('> IMG:last').after('<table class="homebox" border="0" cellpadding="0" cellspacing="1" width="100%"><tbody><tr><td class="row1" rowspan="3" align="center" valign="middle"><div class="gensmall">' + content + '</div></td></tr></tbody></table>');
});

Replace TEXT by the text you want above the image and /IMAGE with the URL of the image.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by Castellana on July 13th 2015, 8:02 pm

Very good That works great! Just one more tiny stylistic thing, if you don't mind.
By adding those text lines the contents of the box moved down to the bottom. Now the bottom of the box (light gray color) is not balanced with the top of the box. Is there a way for me to control how much gray space appears at the bottom? In a widget I'd use <br> as many times as needed. What could I do in this case?

Castellana
Forumember

Female Posts : 282
Reputation : 5
Language : english

http://cvas.forumotion.com/portal

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by Ange Tuteur on July 14th 2015, 7:36 am

You should be able to add some <br/> tags at the end of the string. Right after the closing </table> tag. Adding one should make it even with the top.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by Castellana on July 14th 2015, 2:17 pm

That did the trick! Thanks so much!
Solved. thumleft

Castellana
Forumember

Female Posts : 282
Reputation : 5
Language : english

http://cvas.forumotion.com/portal

Back to top Go down

Solved Re: Second Homepage Message Box?

Post by Ange Tuteur on July 14th 2015, 6:19 pm

You're welcome ^^

Topic archived

Have a nice day. Smile

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum