Welcome to Geeklog, Anonymous Saturday, August 31 2024 @ 11:31 pm EDT
Geeklog Forums
Forum function doesnt work?
Was trying to post some code here on the forum, but the [-CODE] bb(?) function doesn't work like its supose to .. Any sugestions?
Eks:
function userprofile($user)
{
global $_TABLES, $_CONF, $_USER, $LANG04, $LANG01, $LANG_LOGIN, $_GROUPS;
if (empty ($_USER['username']) &&
(($_CONF['loginrequired'] == 1) || ($_CONF['profileloginrequired'] == 1))) {
$retval .= COM_startBlock ($LANG_LOGIN[1], '',
COM_getBlockTemplate ('_msg_block', 'header'));
$login = new Template($_CONF['path_layout'] . 'submit');
$login->set_file (array ('login'=>'submitloginrequired.thtml'));
$login->set_var ('login_message', $LANG_LOGIN[2]);
$login->set_var ('site_url', $_CONF['site_url']);
$login->set_var ('lang_login', $LANG_LOGIN[3]);
$login->set_var ('lang_newuser', $LANG_LOGIN[4]);
$login->parse ('output', 'login');
$retval .= $login->finish ($login->get_var('output'));
$retval .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));
return $retval;
}
Hm?
Try to past that
o.s
Text Formatted Code
function userprofile($user)
{
global $_TABLES, $_CONF, $_USER, $LANG04, $LANG01, $LANG_LOGIN, $_GROUPS;
if (empty ($_USER['username']) &&
(($_CONF['loginrequired'] == 1) || ($_CONF['profileloginrequired'] == 1))) {
$retval .= COM_startBlock ($LANG_LOGIN[1], '',
COM_getBlockTemplate ('_msg_block', 'header'));
$login = new Template($_CONF['path_layout'] . 'submit');
$login->set_file (array ('login'=>'submitloginrequired.thtml'));
$login->set_var ('login_message', $LANG_LOGIN[2]);
$login->set_var ('site_url', $_CONF['site_url']);
$login->set_var ('lang_login', $LANG_LOGIN[3]);
$login->set_var ('lang_newuser', $LANG_LOGIN[4]);
$login->parse ('output', 'login');
$retval .= $login->finish ($login->get_var('output'));
$retval .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));
return $retval;
}
![Smile Smile](https://www.geeklog.net/forum/image_set/pixel.gif)
7
7
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by os: Was trying to post some code here on the forum, but the [-CODE] bb(?) function doesn\'t work like its supose to .. Any sugestions?
Can you be more specific, please?
It does have some known issues:
- preview shows br tags that aren\'t in the actual post
- double line spacing
- something else I forgot (some character not being displayed)
11
8
Quote
Status: offline
os
Forum User
Junior
Registered: 04/11/02
Posts: 27
yeah, that was mostly it ..
Dint find anything when searching, probably because I searched for [CODE ]
It was late, ok?
Aaanywaay, do you know the reason for the double spaceing?
The forum is very nice btw, good work.
o.s
![Rolling Eyes Rolling Eyes](https://www.geeklog.net/forum/image_set/pixel.gif)
![Wink Wink](https://www.geeklog.net/forum/image_set/pixel.gif)
8
13
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by os:Aaanywaay, do you know the reason for the double spaceing?
Not exactly. There\'s a call to nl2br()
somewhere in the handling of CODE. Geeklog had the same problem at one time and the forum still uses that old piece of code taken from an old version of Geeklog.
The funny bit is that this nl2br()
doesn\'t do anything on old versions of PHP. So if you\'re running on a PHP version older than 4.2.0, you won\'t see the double spacing ...
Quote by os:The forum is very nice btw, good work.
I\'m sure Blaine will be pleased to hear that.
bye, Dirk
14
6
Quote
All times are EDT. The time is now 11:31 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content