• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

[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