• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

[done in 2.0.2] Adding BB-Code line

Avast

👽 Chevereto Freak
Hello,

i wanted to add a line for the BB-Code like in Chevereto 1.9 , but something is wrong in my code.....
I hope you can help me.

I edited in the viewer.php

after:

Code:
<div class="input-item"><label for="direct-link"><?php show_lang_txt('txt_show_directly_link'); ?>:</label> <input type="text" id="direct-link" value="<?php show_img_url(); ?>" /></div>

i added:

Code:
<div class="input-item"><label for="bbcode"><?php show_lang_txt('txt_show_bbcode_link'); ?>:</label> <input type="text" id="bbcode-link" value="<?php show_img_bbcode(); ?>" /></div>

after it, i edited the chevereto_lang.php

after:

Code:
$lang['txt_show_viewer_link'] = 'Viewer';

i added:

Code:
$lang['txt_show_bbcode_link'] = 'BB-Code';


in the template.functionc.php

after:

Code:
/**
 * show_img_url
 * echoes the img url
 */
function show_img_url() {
    echo get_img_url();
}

i added:

Code:
/**
 * show_img_bb-code
  * echoes the img bb-cide
   */
function show_img_bbcode() {
    echo get_img_bbcode();
}




I think i've forgotten something.... but don't know what :(


When i update my files with this new code, the script is just showing the directlink of an image and the headline: BB-Code, views, html, bbcode+thumb etc. aren't displayed.

Hope you can help me!

Regards
 
i tried some versions:

get_img_bbcode

get_img_bb-code

etc.

and my dreamweaver found no errors in the function get_img_bbcode.
for example:

get_img_bb-code caused an syntax error
 
PHP:
/**
 * get_img_bbcode
 * Returns the img as bbcode
 */
function get_img_bbcode() {
	return htmlentities('[img]'.get_img_url().'[/img]');
}
function show_img_bbcode() {
	echo get_img_bbcode();
}

Btw it will be added on 2.0.2
 
Back
Top