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 7 users online :: 0 Registered, 0 Hidden and 7 Guests
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
[SOLVED] About an Advertisement Bot
Page 1 of 1 • Share
- GuestGuest
Hello. I just found out this Javascript on a site. I know that I should have asked this on the website where I got this, but it won't allow me to post external links for a period of time (a new member there). So for the problem, I cannot rename the Advertisement Bot's name even if (I know) I edit it in
. If I do so, it just gives me the undefined name.
This is the code (Please don't mind the texts I added there. I was just testing that out):
Is there something lacking there? (Tagging @Ange Tuteur)
|
This is the code (Please don't mind the texts I added there. I was just testing that out):
- Code:
$(function() {
var p = {
post: $('.post')[0],
author: $('.author:first').html(),
date: $('.topic-title').first().html(),
announce: 'What does the fox say?<br>Is this a space?<br><br>Is this a double space?<br><strong>Is this bold?</strong>',//Enter the code beside the advertising
member: 'AdMonster',//Define Name of a Bot
imagem: 'http://i.imgur.com/tdaNexK.jpg',//Picture of the Bot
message: '0',//Total Number of Post
register: 'Always',//Date Registred
location: 'Front Desk'//Location
};
$(p.post).after('
<div class="post row1 online" style="margin:10px 0px 10px 0px">
<span class=corners-top><span></span></span>
<div class=postbody>
<h2 class="topic-title">'+p.date+'</h2>
<p class="author">'+p.author+'</p>
<div class=content>'+p.announce+'</div>
</div>
<div class=postprofile>
<dl><dt><img src='+p.imagem+'><br><b style=font-size:1.2em>'+p.membro+'</b></dt><br><dd>
<span class="label">Messages: </span>'+p.message+'<br>
<span class="label">Date Registered: </span>'+p.register+'<br>
<span class="label">Location: </span>'+p.location+'<br>
</dd>
</dl>
</div>
<span class=corners-bottom><span></span></span></div>
');
});
Is there something lacking there? (Tagging @Ange Tuteur)
Hello @Poser,
As I checked your code I found some classes names without quotes ("")
Try this code:
As I checked your code I found some classes names without quotes ("")
Try this code:
- Code:
$(function() {
var p = {
post: $('.post')[0],
author: $('.author:first').html(),
date: $('.topic-title').first().html(),
announce: 'What does the fox say?<br>Is this a space?<br><br>Is this a double space?<br><strong>Is this bold?</strong>',//Enter the code beside the advertising
member: 'AdMonster',//Define Name of a Bot
imagem: 'http://i.imgur.com/tdaNexK.jpg',//Picture of the Bot
message: '0',//Total Number of Post
register: 'Always',//Date Registred
location: 'Front Desk'//Location
};
$(p.post).after('
<div class="post row1 online" style="margin:10px 0px 10px 0px">
<span class="corners-top"><span></span></span>
<div class="postbody">
<h2 class="topic-title">'+p.date+'</h2>
<p class="author">'+p.author+'</p>
<div class="content">'+p.announce+'</div>
</div>
<div class="postprofile">
<dl><dt><img src='+p.imagem+'><br><b style=font-size:1.2em>'+p.membro+'</b></dt><br><dd>
<span class="label">Messages: </span>'+p.message+'<br>
<span class="label">Date Registered: </span>'+p.register+'<br>
<span class="label">Location: </span>'+p.location+'<br>
</dd>
</dl>
</div>
<span class="corners-bottom"><span></span></span></div>
');
});
- GuestGuest
The name is still undefined.
I wonder why.
I wonder why.
- Wolfuryo
- Gender :
Posts : 256
Points : 3611
Reputation : 81
Language : Romanian and English
Browser : Forum Version :
Hello,
Try:
Try:
- Code:
$(function() {
var p = {
post: $('.post')[0],
author: $('.author:first').html(),
date: $('.topic-title').first().html(),
announce: 'What does the fox say?<br>Is this a space?<br><br>Is this a double space?<br><strong>Is this bold?</strong>',//Enter the code beside the advertising
member: 'AdMonster',//Define Name of a Bot
imagem: 'http://i.imgur.com/tdaNexK.jpg',//Picture of the Bot
message: '0',//Total Number of Post
register: 'Always',//Date Registred
location: 'Front Desk'//Location
};
$(p.post).after('<div class="post row1 online" style="margin:10px 0px 10px 0px"><span class="corners-top"><span></span></span><div class="postbody"><h2 class="topic-title">'+p.date+'</h2><p class="author">'+p.author+'</p> <div class="content">'+p.announce+'</div></div><div class="postprofile"><dl><dt><img src='+p.imagem+'><br><b style="font-size:1.2em">'+p.member+'</b></dt><br><dd><span class="label">Messages: </span>'+p.message+'<br><span class="label">Date Registered: </span>'+p.register+'<br><span class="label">Location: </span>'+p.location+'<br></dd></dl></div><span class="corners-bottom"><span></span></span></div>');
});
- GuestGuest
Well, that worked! Thanks! If you don't mind, what made the previous code not working?
- Wolfuryo
- Gender :
Posts : 256
Points : 3611
Reputation : 81
Language : Romanian and English
Browser : Forum Version :
Hello,
The variable membro is not defined. I simply changed membro to member(defined in the p object) and added the quotes @Van-Helsing mentioned.
'+p.membro+' |
- Sponsored content
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