• 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.

Thumb BB Codes.

Sumanth

Chevereto Member
Hi..Now i am getting links like this
for short url
Code:
http://www.Domain.com/KVM
for BB Codes.
Code:
[img]http://www.Domain.com/images/2012/08/01/uNv48.jpg[/img]

for Thumb bb Codes
Code:
[ url=http://www.Domain.com/images/2012/08/01/uNv48.jpg][img ]http://www.Domain. com/images/2012/08/01/uNv48.th.jpg[/img][/url ]



But i want like this
BB code with short url like this..
Code:
[url=http://www.Domain.com/KV2][img]http://www.Domain.com/images/2012/08/01/uNv48.jpg[/img][/url]

Please someone help me.:)
 
Open content/themes/<yourtheme>/view.php and find this:
Code:
<div class="input-item"><label for="bb-code-thumb"><?php show_lang_txt('txt_thumb_plus_link_bbcode'); ?>:</label> <input type="text" id="bb-code-thumb" value="<?php show_thumb_bbcode(false); ?>" /></div>

Change it to:
Code:
<div class="input-item"><label for="bb-code-thumb"><?php show_lang_txt('txt_thumb_plus_link_bbcode'); ?>:</label> <input type="text" id="bb-code-thumb" value="<?php custom_show_thumb_bbcode(); ?>" /></div>

Save and close the file, then open content/themes/<yourtheme>/functions.php and add this code before ?>:
PHP:
function custom_show_thumb_bbcode() {
    echo str_replace('/'.__CHV_VIRTUALFOLDER_IMAGE__, '', get_thumb_bbcode(false));
}

Save and close the file, then open content/system/js/peafowl.php and change this:
Code:
$("#"+this).val($("#"+this).val().replace(eval('/'+url_to_regex(imgObject.image_viewer)+'/g'), img_new_Object.image_viewer, "g"));

To this:
Code:
$("#"+this).val($("#"+this).val().replace(eval('/'+url_to_regex(imgObject.image_short_url)+'/g'), img_new_Object.image_short_url, "g"));


PS: I know that is a pain in the ass, that's why template js system must be changed.
 
Thank u for reply..
I tried as u said its coming same.
I need everywhere Shorturl for bbcodes,html codes,thumb bb and thumb html except direct links and another new link bbcode with short url.i dont want to see any where direct link for images except Direct links
 
Back
Top