This is not a real mod, just a small modification.
If you don't know what i mean:
chevereto shows us codes like:
but we want people who click on our pictures/thumbs to land on our viewer, then we have a code like this:
If you want to have an image + Link code in your viewer instead of an thumbnail + link bb-code, you have to go to your chevereto/includes/template.function.php
goto line 373
replace with:
image + link to viewer version
thumb + link to viewer:
UPDATE
If you want the image + link to viewer code seperated, follow my instructions:
After this you will have codes like me:
first, open view.php (chevereto/content/themes/Paefowl/view.php
after
add:
open
after:
add:
Now the link will be displayed, but without discription.
To fix this, open your language file (chevereto/content/languages/yourlanguage
So, now we want that the code is changing, if we upload more than one file.
open:/content/system/js/peafowl.php
search for :
(line 346)
add:
it have to look like this:
now it works, without any bugs
Finish
thanks to Rodolfo
If you don't know what i mean:
chevereto shows us codes like:
Code:
[url=http://demo.chevereto.com/images/IDCzs.jpg][img]http://demo.chevereto.com/images/thumbs/IDCzs.jpg[/img][/url]
but we want people who click on our pictures/thumbs to land on our viewer, then we have a code like this:
Code:
for thumbs+ link to viewer
[url=http://demo.chevereto.com/?v=IDCzs.jpg][img]http://demo.chevereto.com/images/thumbs/IDCzs.jpg[/img][/url]
or
for image+ link to viewer
[url=http://demo.chevereto.com/?v=IDCzs.jpg][img]http://demo.chevereto.com/images/images/IDCzs.jpg[/img][/url]
If you want to have an image + Link code in your viewer instead of an thumbnail + link bb-code, you have to go to your chevereto/includes/template.function.php
goto line 373
Code:
/**
* get_thumb_bbcode
* Returns the thumb + img link as bbcode
*/
function get_thumb_bbcode() {
return htmlentities('[url='.get_img_url().'][img]'.get_thumb_url().'[/img][/url]');
}
function show_thumb_bbcode() {
echo get_thumb_bbcode();
}
replace with:
image + link to viewer version
Code:
/**
* get_thumb_bbcode
* Returns the thumb + img link as bbcode
*/
function get_thumb_bbcode() {
return htmlentities('[url='.get_img_viewer().'][img]'.get_img_url().'[/img][/url]');
}
function show_thumb_bbcode() {
echo get_thumb_bbcode();
}
thumb + link to viewer:
Code:
/**
* get_thumb_bbcode
* Returns the thumb + img link as bbcode
*/
function get_thumb_bbcode() {
return htmlentities('[url='.get_img_viewer().'][img]'.get_thumb_url().'[/img][/url]');
}
function show_thumb_bbcode() {
echo get_thumb_bbcode();
}
UPDATE
If you want the image + link to viewer code seperated, follow my instructions:
After this you will have codes like me:
first, open view.php (chevereto/content/themes/Paefowl/view.php
after
Code:
<div class="input-item"><label for="thumb-url"><?php show_lang_txt('txt_thumb_url'); ?>:</label> <input type="text" id="thumb-url" value="<?php show_thumb_url(); ?>" /></div>
add:
Code:
<div class="input-item"><label for="bb-code-link"><?php show_lang_txt('txt_img_plus_link_bbcode'); ?>:</label> <input type="text" id="bb-code-link" value="<?php show_img_link(); ?>" /></div>
open
after:
Code:
/**
* get_thumb_bbcode
* Returns the thumb + img link as bbcode
*/
function get_thumb_bbcode() {
return htmlentities('[url='.get_img_url().'][img]'.get_thumb_url().'[/img][/url]');
}
function show_thumb_bbcode() {
echo get_thumb_bbcode();
}
add:
Code:
/**
* get_image_link
* Returns the image + img link to bb-code as bbcode
*/
function get_img_link() {
return htmlentities('[url='.get_img_viewer().'][img]'.get_img_url().'[/img][/url]');
}
function show_img_link() {
echo get_img_link();
}
Now the link will be displayed, but without discription.
To fix this, open your language file (chevereto/content/languages/yourlanguage
Code:
$lang['txt_img_plus_link_bbcode'] = 'BB Code (Image to Viewer)';
So, now we want that the code is changing, if we upload more than one file.
open:/content/system/js/peafowl.php
search for :
(line 346)
Code:
// Changes
var ChangedIDs = ["viewer-link", "direct-link", "html-image", "html-code", "bb-code", "bb-code-thumb", "thumb-url"];
add:
Code:
"bb-code-link"
it have to look like this:
Code:
// Changes
var ChangedIDs = ["viewer-link", "direct-link", "html-image", "html-code", "bb-code", "bb-code-thumb", "thumb-url","bb-code-link"];
now it works, without any bugs
Finish
thanks to Rodolfo