4images Forum & Community
The forum for all 4images gallery administrators
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
[2023-01-23] 4images 1.10 released
Home
Help
Search
Login
Register
4images Forum & Community
»
4images Issues / Ausgaben
»
Discussion & Troubleshooting
(Moderator:
Acidgod
) »
What is wrong with my emails in gallery?
« previous
next »
Print
Pages:
1
[
2
]
Author
Topic: What is wrong with my emails in gallery? (Read 11423 times)
0 Members and 1 Guest are viewing this topic.
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Global Moderator
4images Guru
Posts: 17.849
mmm PHP...
Re: What is wrong with my emails in gallery?
«
Reply #15 on:
September 20, 2011, 12:15:07 PM »
Please attach your includes/functions.php
format_text function has been changed, but some of the mods that replacing/modifying that function are based on old version, I suspect the problem is in there.
Logged
Your first three "must do" before you ask a question:
Forum rules
FAQ
Error messages
Bug Fixes & Patches
Search
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer.
(
forum rule #6
)
Extension for Firefox/Thunderbird:
Master Password+
Back/Forward History Tweaks (restartless)
Cookies Manager+
Fit Images (restartless for Thunderbird)
MrAndrew
Sr. Member
Posts: 302
Re: What is wrong with my emails in gallery?
«
Reply #16 on:
September 20, 2011, 12:16:46 PM »
Ok.. This is my functions.php
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Global Moderator
4images Guru
Posts: 17.849
mmm PHP...
Re: What is wrong with my emails in gallery?
«
Reply #17 on:
September 20, 2011, 12:32:19 PM »
I guess the simplest solution would be replace the whole format_text function with default one:
function
format_text
(
$text
,
$html
=
0
,
$word_wrap
=
0
,
$bbcode
=
0
,
$bbcode_img
=
0
) {
if (
$word_wrap
&&
$text
!=
""
) {
$text
=
preg_replace
(
"/([^\n\r ?&\.\/<>\"\\-]{"
.
$word_wrap
.
"})/i"
,
" \\1\n"
,
$text
);
}
if (
$html
==
0
||
$html
==
2
) {
$text
=
safe_htmlspecialchars
(
$text
);
}
// Replace { to prevent parsing in templates
global
$site_template
;
$text
=
preg_replace
(
'='
.
preg_quote
(
$site_template
->
start
).
'([A-Z0-9_]+)'
.
preg_quote
(
$site_template
->
end
).
'=Usi'
,
'&#123;\1&#125;'
,
$text
);
if (
$html
!==
2
) {
$text
=
nl2br
(
trim
(
$text
));
$text
=
replace_url
(
$text
);
}
if (
$bbcode
==
1
) {
$search_array
= array(
"/(\[)(list)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/list)(((=)(\\4)([^\"']*)(\\4]))|(\]))/siU"
,
"/(\[)(list)(])(.*)(\[\/list\])/siU"
,
"/(\[\*\])/siU"
,
"/(\[\/\*\])/siU"
,
"/(\[)(url)(=)(['\"]?)(www\.)([^\"']*)(\\4])(.*)(\[\/url\])/siU"
,
"/(\[)(url)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/url\])/siU"
,
"/(\[)(url)(])(www\.)([^\"]*)(\[\/url\])/siU"
,
"/(\[)(url)(])([^\"]*)(\[\/url\])/siU"
,
"/(\[)(code)(])(\r\n)*(.*)(\[\/code\])/siU"
,
"/javascript:/si"
,
"/about:/si"
);
$replace_array
= array(
"<ol type=\"\\5\">\\7</ol>"
,
"<ul>\\4</ul>"
,
"<li>"
,
"</li>"
,
"<a href=\"http://www.\\6\" target=\"_blank\" rel=\"nofollow\">\\8</a>"
,
"<a href=\"\\5\" target=\"_blank\" rel=\"nofollow\">\\7</a>"
,
"<a href=\"http://www.\\5\" target=\"_blank\" rel=\"nofollow\">www.\\5</a>"
,
"<a href=\"\\4\" target=\"_blank\" rel=\"nofollow\">\\4</a>"
,
"<pre>Code:<hr size=1>\\5<hr size=1></pre>"
,
"java script:"
,
"about :"
);
$text
=
preg_replace
(
$search_array
,
$replace_array
,
$text
);
if (!
$bbcode_img
) {
$text
=
preg_replace
(
"/(\[)(img)(])(\r\n)*([^\"]*)(\[\/img\])/siU"
,
"<a href=\"\\5\" target=\"_blank\">\\5</a>"
,
$text
);
}
else {
$text
=
preg_replace
(
"/(\[)(img)(])(\r\n)*([^\"]*)(\[\/img\])/siU"
,
"<img src=\"\\5\">"
,
$text
);
}
$text
=
preg_replace
(
"/(\[)(b)(])(\r\n)*([^\"]*)(\[\/b\])/siU"
,
"<b>\\5</b>"
,
$text
);
$text
=
preg_replace
(
"/(\[)(i)(])(\r\n)*([^\"]*)(\[\/i\])/siU"
,
"<i>\\5</i>"
,
$text
);
$text
=
preg_replace
(
"/(\[)(u)(])(\r\n)*([^\"]*)(\[\/u\])/siU"
,
"<u>\\5</u>"
,
$text
);
$text
=
replace_badwords
(
$text
);
}
$text
=
str_replace
(
"\\'"
,
"'"
,
$text
);
return
$text
;
}
(don't miss the last bracket
)
Logged
Your first three "must do" before you ask a question:
Forum rules
FAQ
Error messages
Bug Fixes & Patches
Search
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer.
(
forum rule #6
)
Extension for Firefox/Thunderbird:
Master Password+
Back/Forward History Tweaks (restartless)
Cookies Manager+
Fit Images (restartless for Thunderbird)
MrAndrew
Sr. Member
Posts: 302
Re: What is wrong with my emails in gallery?
«
Reply #18 on:
September 20, 2011, 12:37:48 PM »
YES, YES, YES. IT IS! Many thanks.. But what was the problem?
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Global Moderator
4images Guru
Posts: 17.849
mmm PHP...
Re: What is wrong with my emails in gallery?
«
Reply #19 on:
September 20, 2011, 12:41:55 PM »
You didn't completely remove the smilies mod, your function did not match the original.
Logged
Your first three "must do" before you ask a question:
Forum rules
FAQ
Error messages
Bug Fixes & Patches
Search
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer.
(
forum rule #6
)
Extension for Firefox/Thunderbird:
Master Password+
Back/Forward History Tweaks (restartless)
Cookies Manager+
Fit Images (restartless for Thunderbird)
MrAndrew
Sr. Member
Posts: 302
Re: What is wrong with my emails in gallery?
«
Reply #20 on:
September 20, 2011, 12:47:09 PM »
Thanks for help, Vano, Rembrandt!
Logged
Print
Pages:
1
[
2
]
« previous
next »
4images Forum & Community
»
4images Issues / Ausgaben
»
Discussion & Troubleshooting
(Moderator:
Acidgod
) »
What is wrong with my emails in gallery?