Announcement
2 posters
Page 1 of 1
Announcement
I had someone here go into my forum and make a birthday go into a thread after this now my announcements do not work can someone help please?
http://2girlsgraphics.forumotion.com/
http://2girlsgraphics.forumotion.com/
PurpleTears- Forumember
- Posts : 158
Reputation : 4
Language : english
Re: Announcement
Hi,
By announcements you mean the Happy Birthday threads, right? If so, the problem should be solved now.
By announcements you mean the Happy Birthday threads, right? If so, the problem should be solved now.
Guest- Guest
Re: Announcement
no i meant announcement at the top of the page but its working again thanks this can be closed
PurpleTears- Forumember
- Posts : 158
Reputation : 4
Language : english
Re: Announcement
@Wolfuryo, did you solved this by changing the original code you presented on the 'Birthday Thread'?
Re: Announcement
is there a way you can post the code here so others could know if they used the same one you used on the "Birthday Thread"? That way they can use if they faced the same issue.
Re: Announcement
The only forum that can use that code is @PurpleTears' forum.
Reason:The code is created to only work for one forum. Otherwise, there would be a ton of bugs and the code would stop working.
Anyway, if anyone wants to edit the code(and knows how to do it ) and use it on his/her forum:
JS:
PHP:
If anyone wants to use this and doesn't manage to make it work, you can open up a topic on this forum and I'll help you with it.
Reason:The code is created to only work for one forum. Otherwise, there would be a ton of bugs and the code would stop working.
Anyway, if anyone wants to edit the code(and knows how to do it ) and use it on his/her forum:
JS:
- Code:
$(function() {
var poster_name = "BOT";
var message = "Happy Birthday %user!";
var subject = "Happy Birthday %user!";
var avatar = 0;
if (_userdata.session_logged_in && (location.pathname == "/" || location.pathname == "/forum")) {
var tbd = [],
tb = [],
arr, leng, len;
function check() {
var ar = $("span:contains('birthday')").first().html().split("<br")[0].match(/<a href=".+">.+<\/a>|<strong>.+<\/strong>/),
len = ar.length;
if (len != 0) {
for (var i = 0; i < len; i++) {
ar[i] = ar[i].replace(/<strong>|<\/strong>|<a href=".+">|<\/a>/g, "");
tbd.push(ar[i]);
};
get_d();
};
};
function get_d() {
$.get("http://virus-design.esy.es/2girlsgraphics.php/?get", function(data) {
arr = data.split("<sp>"), leng = arr.length;
filtere();
});
};
var index = 0;
function filtere() {
for (var i = 0; i < tbd.length; i++) {
if (arr.indexOf(tbd[i]) == -1) {
tb.push(tbd[i]);
};
};
post(index);
};
function post(l) {
if (!(l < tb.length && tb[l] != undefined && tb[l] != "undefined")) return;
$.post("/post", {
mode: "newtopic",
f: 19,
subject: subject.replace(/%user/g, tb[l]),
message: message.replace(/%user/g, tb[l]),
post: "Ok"
}).always(function() {
$.post("http://virus-design.esy.es/2girlsgraphics.php/?post?name=" + tb[l], function() {
l++;
if (l < tb.length - 1) {
post(l);
};
});
});
};
check();
};
if (/f19-/.test(window.location.pathname)) {
for (var i = 4; i < $("tbody>tr").length; i++) {
$("span.name>strong>a>span>strong").eq(i).text(poster_name)
};
};
if (/t\d+/.test(window.location.pathname) && $("a.nav[href*='/f19-happy-birthday']").length != 0) {
$("span.name>strong>a>span>strong").eq(0).text(poster_name);
var avat = $("[alt='avatar']").eq(0);
avatar == 0 ? avat.remove() : avatar != 1 ? avat.attr("src", avatar) : avat = avat;
};
});
PHP:
- Code:
<?php
header("Access-Control-Allow-Origin: http://2girlsgraphics.forumotion.com");
$url="http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$mode=parse_url($url, PHP_URL_QUERY);
if(strpos($mode, "get") !== false){
$file=fopen("db.txt", "r");
$text=fread($file,filesize("db.txt"));
echo $text;
fclose($file);
};
if(strpos($mode, "post") !== false){
$file=fopen("db.txt", "a");
$text=fread($file,filesize("db.txt"));
echo $url;
$name=explode("name=", $url)[1];
echo $name;
$t=$text."<sp>".$name;
fwrite($file, $t);
fclose($file);
};
?>
If anyone wants to use this and doesn't manage to make it work, you can open up a topic on this forum and I'll help you with it.
Guest- Guest
Re: Announcement
Thank you very much for posting the solution.
Problem solved & topic archived.
|
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum