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.

How to customize viewtopic_body?

Page 2 of 2 Previous  1, 2

View previous topic View next topic Go down

Solved How to customize viewtopic_body?

Post by AlexisMcDevin on January 6th 2015, 8:15 pm

First topic message reminder :

Dear all,

My forum is in phpBB3.

Link to see post: http://ccxiqi.forumvi.com/t544-topic#2065

I want to customize viewtopic_body in my forum like below.

Is this possible? Please help.




Thank you very much!
Alex.


Last edited by AlexisMcDevin on January 31st 2015, 11:45 am; edited 1 time in total

AlexisMcDevin
Forumember

Male Posts : 133
Reputation : 5
Language : English

http://ccxiqi.forumvi.com/

Back to top Go down


Solved Re: How to customize viewtopic_body?

Post by Ange Tuteur on January 25th 2015, 1:21 am

The like button : I am not exactly sure what's going on there. It could be down to an error on your forum. I'll have to look into that..

The word wrap : That is a side effect from the fix I applied for this problem you had. I'd try to take a further look, but your forum keeps redirecting me.


I could work on a thanks effect for your structure, but I can't work on it when I keep getting redirected while viewing topics. As for multiple thanks for the author, the system is only designed for one thanks.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by AlexisMcDevin on January 26th 2015, 1:56 am

@Ange Tuteur wrote:The like button : I am not exactly sure what's going on there. It could be down to an error on your forum. I'll have to look into that..

The word wrap : That is a side effect from the fix I applied for this problem you had. I'd try to take a further look, but your forum keeps redirecting me.

I could work on a thanks effect for your structure, but I can't work on it when I keep getting redirected while viewing topics. As for multiple thanks for the author, the system is only designed for one thanks.

Hi @Ange Tuteur,

Can you help me on thanks effect? I will give you admin account via your email address or private message, I do not have any problems on this and I promise, I will not have any comments or complaining on this too.

Let me know if you can help.

Thank you!
Alex.

AlexisMcDevin
Forumember

Male Posts : 133
Reputation : 5
Language : English

http://ccxiqi.forumvi.com/

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by Ange Tuteur on January 26th 2015, 3:14 am

See if this works for you.

Go to Administration Panel > Display > Colors > CSS stylesheet

Paste the following code :
Code:
.thanked {
  color:#6A6;
  font-size:16px;
  font-weight:bold;
  text-align:center;
}


Then go to Administration Panel > Modules > JavaScript codes management > Create a new script

Title : Your choice
Placement : In the topics
Paste the code below :
Code:
$(function() {
  var thankColor = '#e9f7e1',
      thankMsg = 'The topic starter thanks you !';
  $('.post[style="background-color:'+thankColor+';"]').css('background','none').find('.row1.arrows + .row2').prepend('<div class="thanked">'+thankMsg+'</div>');
});

There's two things you can modify.

thankColor : The color that thanked posts are applied with. Find the color in Display > Colors > Thanked message background color. Copy the color there into this field.

thankMsg : The message displayed when someone is thanked. You can add images to the message with HTML.
Code:
<img src="/myimage.gif"/>

Just replace /myimage.gif by the URL of your image.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by AlexisMcDevin on January 27th 2015, 1:54 pm

Hi @Ange Tuteur,

It does not work on my forum. I add JS and CSS code but I do not known how to add thanksmsg image to js code.
I just used text but nothing happen. Can you have any other ideas to get it done?

Thank you!
Alex.

AlexisMcDevin
Forumember

Male Posts : 133
Reputation : 5
Language : English

http://ccxiqi.forumvi.com/

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by _Twisted_Mods_ on January 27th 2015, 2:41 pm

can u provide a link to a thanked post

_Twisted_Mods_
Helper
Helper

Male Posts : 2020
Reputation : 299
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by AlexisMcDevin on January 27th 2015, 7:18 pm

Hi @_Twisted_Mods_,

- This is the topic that I already thanked post but nothing show up: http://ccxiqi.forumvi.com/t874-topic.
- Here is the topic that have not yet thanked post: http://ccxiqi.forumvi.com/t875-topic

Please be noted that you have to login with below information to view my forum.

Account for testing: demoweb
Password: 123456A

AlexisMcDevin
Forumember

Male Posts : 133
Reputation : 5
Language : English

http://ccxiqi.forumvi.com/

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by _Twisted_Mods_ on January 27th 2015, 7:38 pm

you need to goto Display > Colors > Thanked message background color and change that color to somthing diferent then your oher forum colors .. the copy the color code you choose and use it in the script

var thankColor = '#e9f7e1', < replace color code with your new color

_Twisted_Mods_
Helper
Helper

Male Posts : 2020
Reputation : 299
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by AlexisMcDevin on January 27th 2015, 10:35 pm

Hi @_Twisted_Mods_,

We are talking about thanks of topic starter with message and image like below. (do not talking about Thanked message background color). Since I am using the image backgound for post, so that Thanked message background color can not show up.


AlexisMcDevin
Forumember

Male Posts : 133
Reputation : 5
Language : English

http://ccxiqi.forumvi.com/

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by _Twisted_Mods_ on January 28th 2015, 12:28 am

What the fuck ?!? thats how the script works .. it detects the post background color if it = var thankColor then it adds the message or image to that post

_Twisted_Mods_
Helper
Helper

Male Posts : 2020
Reputation : 299
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by Ange Tuteur on January 28th 2015, 3:36 am

In the script replace #e9f7e1 by #f1b9f7

It needs to be your thanked post color, otherwise it wont work.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by AlexisMcDevin on January 28th 2015, 6:20 am


Hi @Ange Tuteur/ @_Twisted_Mods_,

The message "The topic starter thanks you !" already showed up.

How can I change text color, position and add more image for this message? I should be like below image.


AlexisMcDevin
Forumember

Male Posts : 133
Reputation : 5
Language : English

http://ccxiqi.forumvi.com/

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by _Twisted_Mods_ on January 28th 2015, 12:32 pm

where is says
Code:
<div class="thanked">'+thankMsg+'</div>

you can put any html there you want after of brefore witch include img tags

<br><img src="imgurl">

the br is a line break brings the image down to next line

as far as moving the text you can try adding

margin-top:150px; to your .thanked css and adjust it as needed you can also use a -numb to make it go the other way

_Twisted_Mods_
Helper
Helper

Male Posts : 2020
Reputation : 299
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by Ange Tuteur on January 28th 2015, 8:23 pm

^^ YEEES

@AlexisMcDevin I made an explanation under the script :
thankMsg : The message displayed when someone is thanked. You can add images to the message with HTML.
Code:
<img src="/myimage.gif"/>

Just replace /myimage.gif by the URL of your image.

So in the script, we'd replace :
Code:
thankMsg = 'The topic starter thanks you !';

by :
Code:
thankMsg = '<img src="/myimage.gif"/>The topic starter thanks you !<img src="/myimage.gif"/>';

As for the style of the message, I gave you CSS before which you can change the colors on. Mr. Green

Find this in your CSS :
Code:
.thanked {
  color:#6A6;
  font-size:16px;
  font-weight:bold;
  text-align:center;
}

and replace #6A6 by the color of your choice. Smile

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by AlexisMcDevin on January 29th 2015, 10:43 am

Hi @Ange Tuteur,

Thank you very much!

Thanked topic starter already showed up. I only have the last request for this, please take a help to move the message to correct position per below image.

- Picture (01) is the original.

- Picture (02) is what I want to do.


AlexisMcDevin
Forumember

Male Posts : 133
Reputation : 5
Language : English

http://ccxiqi.forumvi.com/

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by _Twisted_Mods_ on January 29th 2015, 11:37 am

try changing

Code:
.find('.row1.arrows + .row2')

to

Code:
.find('.profile-icons')

might have to add some margin-right:30px; to your css

_Twisted_Mods_
Helper
Helper

Male Posts : 2020
Reputation : 299
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by AlexisMcDevin on January 29th 2015, 9:09 pm

@_Twisted_Mods_ wrote:try changing

Code:
.find('.row1.arrows + .row2')

to

Code:
.find('.profile-icons')

might have to add some margin-right:30px; to your css

Hi @_Twisted_Mods_,


I changed to your code and thanked topic starter wrong place.

Code:
$(function() {
      var thankColor = '#f1b9f7',
              thankMsg = '<img src="http://i38.servimg.com/u/f38/19/06/50/42/gold2710.png"/>The topic starter thanks you !<img src="http://i38.servimg.com/u/f38/19/06/50/42/gold2710.png"/>';
      $('.post[style="background-color:'+thankColor+';"]').css('background','none').find('.profile-icons').prepend('<div class="thanked">'+thankMsg+'</div>');
    });


AlexisMcDevin
Forumember

Male Posts : 133
Reputation : 5
Language : English

http://ccxiqi.forumvi.com/

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by AlexisMcDevin on January 31st 2015, 10:06 am

Hi @Ange Tuteur,

Please take a help to correct position of thanked message topic starter.

Thank you!
Alex.

AlexisMcDevin
Forumember

Male Posts : 133
Reputation : 5
Language : English

http://ccxiqi.forumvi.com/

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by SarkZKalie on January 31st 2015, 11:24 am

Replace this with previous Katty's CSSMad
Code:
.thanked {
color:#6A6;
font-size:16px;
font-weight:bold;
text-align:center;
float:left;
margin-right:1em;
}

SarkZKalie
Forumember

Male Posts : 419
Reputation : 74
Language : English

http://rotavn.nstars.org/

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by AlexisMcDevin on January 31st 2015, 11:44 am

Hi @sarkzkalie01,

Thank you very much! Your code worked very well.

This topic had been solved!

All of you guys, I really thank you!

Alex.

AlexisMcDevin
Forumember

Male Posts : 133
Reputation : 5
Language : English

http://ccxiqi.forumvi.com/

Back to top Go down

Solved Re: How to customize viewtopic_body?

Post by Ramdaman on January 31st 2015, 4:17 pm

Topic solved and archived.

Ramdaman
Active Poster

Male Posts : 1614
Reputation : 96
Language : English, Albanian, Macedonian, Russian | HTML, CSS
Location : New York City

http://ndihme.forumotion.com/forum

Back to top Go down

Page 2 of 2 Previous  1, 2

View previous topic View next topic Back to top


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