Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
Recent Tutorials
Top posting users this month
Top Achievers
Who is online?
In total there are 41 users online :: 0 Registered, 0 Hidden and 41 Guests :: 1 Bot
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
is there a way to add image above the post content first post only
Page 1 of 1 • Share
is there a way to add image above the post content first post only
like this CSS
even with Java will do fine
like this CSS
- Code:
.hr {
background: url(http://i63.servimg.com/u/f63/11/53/34/85/f3al_c10.png) no-repeat;
background-position: top;
text-align: center;
vertical-align: text-bottom;
padding: 0px 325px 210px;
line-height: normal;
}
even with Java will do fine
Hi @Michael_vx,
Your best bet is definitely javascript. Try using this script :
Replace
with the content you want before the post content.
Your best bet is definitely javascript. Try using this script :
- Code:
$(function() {
$('.post').eq(0).find('.postbody').before('<div>CONTENT HERE</div>');
});
Replace
|
its working good but
its not inside the post content
can it be just inside
i tried
almost solved
its not inside the post content
can it be just inside
i tried
- Code:
$(function() { $('.postbody').eq(0).prepend('<img alt=""
src="http://i63.servimg.com/u/f63/11/53/34/85/f3al_c10.png"
style="width: 464px; height: 130px;" />');});
almost solved
@Michael_vx try this instead :
- Code:
$(function() {
$('.post').eq(0).find('.postbody > div').prepend('<div>CONTENT HERE</div>');
});
thats a way to go my friend
expect for it show dual images (repeat the image for 1 other time )
used like this
and used like this
not sure why but that is 99% good and working
expect for it show dual images (repeat the image for 1 other time )
used like this
- Code:
$(function() {
$('.post').eq(0).find('.postbody > div').prepend('<div><img src="http://i63.servimg.com/u/f63/11/53/34/85/f3al_c10.png"></div>');
});
and used like this
- Code:
$(function() {
$('.post').eq(0).find('.postbody > div').prepend('<img src="http://i63.servimg.com/u/f63/11/53/34/85/f3al_c10.png">');
});
not sure why but that is 99% good and working
If you want to use two images you can add them both in the same script like this :
Although to make it more readable you can concat the string using "+" :
Basically you're just adding multiple strings together, like in math were you add numbers together. For example :
- Code:
$(function() {
$('.post').eq(0).find('.postbody > div').prepend('<div><img src="http://i63.servimg.com/u/f63/11/53/34/85/f3al_c10.png"><img src="http://i63.servimg.com/u/f63/11/53/34/85/f3al_c10.png"></div>');
});
Although to make it more readable you can concat the string using "+" :
- Code:
$(function() {
$('.post').eq(0).find('.postbody > div').prepend(
'<div>'+
'<img src="http://i63.servimg.com/u/f63/11/53/34/85/f3al_c10.png">'+
'<img src="http://i63.servimg.com/u/f63/11/53/34/85/f3al_c10.png">'+
'</div>');
});
Basically you're just adding multiple strings together, like in math were you add numbers together. For example :
- Code:
1 + 2 + 3; // 6
'Hello' + ' ' + 'world' + '!'; // "Hello world!"
@Michael_vx ooooooooh ! It might be the selector, try changing
into
.
|
|
yep but it worked this way
.postbody > div:first
not
.postbody > div:first-child
what make me a little confused is .postbody shoud be the tag for phpbb2 but the Script not working with it
but tag is working with phpbb3
thats sounds crazy but i think i may try to think about something for it
ـــــــــــــــــــ Edit ـــــــــــــــــــــــــــــــــــــــــــــــ
never mind
i get what i was missing
.post = phpbb3
tr.post = phpbb2
topic is solved due i have the rest versions tags stored some where on my forum
thanks so much
you really did a great help
- Code:
$(function() {
$('.post').eq(0).find('.postbody > div:first').prepend('<div><img src="http://i63.servimg.com/u/f63/11/53/34/85/f3al_c10.png"></div>');
});
.postbody > div:first
not
.postbody > div:first-child
what make me a little confused is .postbody shoud be the tag for phpbb2 but the Script not working with it
but tag is working with phpbb3
thats sounds crazy but i think i may try to think about something for it
ـــــــــــــــــــ Edit ـــــــــــــــــــــــــــــــــــــــــــــــ
never mind
i get what i was missing
.post = phpbb3
tr.post = phpbb2
topic is solved due i have the rest versions tags stored some where on my forum
thanks so much
you really did a great help
- GuestGuest
*** Topic solved, locked and archived ***
Similar topics
Create an account or log in to leave a reply
You need to be a member in order to leave a reply.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum