Welcome to Geeklog, Anonymous Tuesday, May 07 2024 @ 08:40 pm EDT

Geeklog Forums

Documentation on BB code and geeklog ebmedded tags


Status: offline

mstewart

Forum User
Newbie
Registered: 07/09/07
Posts: 13
Where do I find the descriptions of these and their use? "
Text Formatted Code
, [page_break] ect.. on the submit story page there is a long list. Many of which I dont know what they are.

Im trying to put in a contacts page(a simple story submittion) and link to users on the system or just their email address.
Im trying simple html "<a href="name@place.net">Name</a>"
When that displays it shows a link to mygeeklog/admin/name@place.net
Cant make that work either.

Actually what I would like to do is link to the user profile.
How do I do that?


Thanks
Mike
http://www2.eaa690.org:8080/article.php?story=20070713073036872
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
Quote by: mstewartWhere do I find the descriptions of these and their use?
"[ code], [ page_break] ect.. on the submit story page there is a long list. Many of which I don't know what they are.
Make a dummy page no one can see and try them out. They're just formatting. They can't break anything.

There are two things in that list. BBCodes for formatting and Autotags for linking. Code and Page_break are formatting codes (and page_break is only available in stories). Code creates pre-formatted text useful for posting code (see below for an example)

Autotags create links to other geeklog pages. The nice thing about autotag links is you don't need to remember how to link to that staticpage. You just say [ staticpage:xyz] and it generates the proper url.
Im trying to put in a contacts page(a simple story submittion) and link to users on the system or just their email address.
Im trying simple html "<a href="name@place.net">Name</a>"
When that displays it shows a link to mygeeklog/admin/name@place.net
Cant make that work either.

Okay, you need to say href="mailto:name@example.com" and modify the $_CONF['allowed_protocols'] array to include mailto: to make that work. BUT DON'T DO IT. All you will do increase you poor users' spam 100x because spammers spider the Internet looking for mailto links.
Actually what I would like to do is link to the user profile.
How do I do that?
Well... There is no profile autotag. But you could download the autotags plugin and create a profile: autotag. It probably needs to be a php function:
Text Formatted Code
function phpautotags_profile($p1, $p2, $fulltag)
{
    global $_TABLES, $_CONF;

    if ($p1 > 1) {
        $uid = $p1;
    } else {
        $name = trim(substr($fulltag,9,strlen($fulltag)-10));
        $uid = DB_getItem($_TABLES['users'], 'uid',"username like '{$name}%' or fullname like '{$name}%'");
    }
    if ($uid > 1) {
        $name = COM_getDisplayName($uid);
        return "<a href=\"{$_CONF['site_url']}/users.php?mode=profile&uid={$uid}\">$name</a>";
    }
    return '';
}

Add that to your lib-custom.php, create an autotag called 'profile' and you can then put [profile:Fred Example] into your story and it will create a link to that user's profile (assuming Fred Example uniquely identifies a user). You could also say [profile:343] where 343 is uid in the system to precisely pick a user.

I suppose I should add that to the plugin if people find it useful.
 Quote

All times are EDT. The time is now 08:40 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