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

List of links with viewer link

Budziol

Chevereto Member
Yes, I know stupid name of Topic, but I don't know how to call this.

My question is :
How could I get this effect :
ex.
BBCode list of links now is :
Code:
[img]http://dajfoto.pl/images/VL8t1.gif[/img]
[img]http://dajfoto.pl/images/4EUR.gif[/img]

I want this :
Code:
[url=http://dajfoto.pl/?v=VL8t1.gif][img]http://dajfoto.pl/images/VL8t1.gif[/img][/url]
[url=http://dajfoto.pl/?v=4EUR.gif][img]http://dajfoto.pl/images/4EUR.gif[/img][/url]

I want to every list of links (HTML, BBCode, Thumbs in HTML, Thumbs in BBCode) to link viewer.
 
Open: /includes/template.functions.php

Find (Line: 359):
Code:
return htmlentities('[url='.get_img_url().'][img]'.get_thumb_url().'[/img][/url]');

Replace with:
Code:
return htmlentities('[url='.get_img_viewer().'][img]'.get_thumb_url().'[/img][/url]');

Save and Replace.
 
I've done this so much earlier but this solution does not work.
It works only in viewer, but not in List of links.

Rodolfo said that I need to edit peafowl.php (content/system/js), but I will wait for his answer how to do that.
 
I think I can understand why, He'll be placing ads on the 'viewer page' and if someone goes to the image, goes to his site with the ads, with the direct link, there are no ads.
 
Cory said:
I think I can understand why, He'll be placing ads on the 'viewer page' and if someone goes to the image, goes to his site with the ads, with the direct link, there are no ads.

That's why imageshack blocked the directlink for guests :p

You have to go to peafowl.php , search for linklist section and just edit the lines where you want to have the viewer link.
 
Yes I know. Link to image in this code is :
value.img_url
but how is link to viewer ?

I tried this : value.viewer_link
but it doesn't work.
 
Is not too hard to edit it, is just javascript:
Code:
/*** Process the ImagesObj ***/
    var multiupload_thumbs = "";
    $.each(ImagesObj, function(key, value) {
        multiupload_thumbs += '<img src="'+value.thumb_url+'" id="'+key+'" height="'+value.thumb_height+'"/>';
        multi_codes_textarea["direct-links"] += value.img_url+"\n";
        multi_codes_textarea["html-codes"] += '&lt;img src="'+value.img_url+'" border="0" /&gt;'+"\n";
        multi_codes_textarea["bb-codes"] += "[img]"+value.img_url+"[/img]"+"\n";
        multi_codes_textarea["html-thumb-codes"] += '&lt;a href="'+value.img_url+'"&gt;&lt;img src="'+value.thumb_url+'" border="0" /&gt;&lt;/a&gt;'+"\n";
        multi_codes_textarea["thumb-bb-codes"] += "[url="+value.img_url+"][img]"+value.thumb_url+"[/img][/url]"+"\n";
    });
 
Yes, but I don't know Javascript.

I just want to know how is link to viewer.
Link to thumb is :
value.thumb_url

but how is link to viewer ?
 
Budziol said:
Yes, but I don't know Javascript.

I just want to know how is link to viewer.
Link to thumb is :
value.thumb_url

but how is link to viewer ?

Viewer is ?v=value.img_name

like this:
Code:
/*** Process the ImagesObj ***/
    var multiupload_thumbs = "";
    $.each(ImagesObj, function(key, value) {
        multiupload_thumbs += '<img src="'+value.thumb_url+'" id="'+key+'" height="'+value.thumb_height+'"/>';
        multi_codes_textarea["direct-links"] += value.img_url+"\n";
        multi_codes_textarea["html-codes"] += '&lt;img src="'+value.img_url+'" border="0" /&gt;'+"\n";
        multi_codes_textarea["bb-codes"] += "[img]"+value.img_url+"[/img]"+"\n";
        multi_codes_textarea["html-thumb-codes"] += '&lt;a href="<?php echo __CHV_BASE_URL__; ?>?v='+value.img_name+'"&gt;&lt;img src="'+value.thumb_url+'" border="0" /&gt;&lt;/a&gt;'+"\n";
        multi_codes_textarea["thumb-bb-codes"] += "[url=<?php echo __CHV_BASE_URL__; ?>?v="+value.img_name+"][img]"+value.thumb_url+"[/img][/url]"+"\n";
    });
 
Thanks Rodolfo, this is very handy. Would be great to be able to modify this from the config.php or another file, so we don't have to edit this every time we do an upgrade.

Also, it is possible to get on the multi upload link the short link to direct images?
This is very handy if we want to bulk upload some files to publish to twitter or Facebook.

Regards!
 
please how to change direct links into viewer links here also change bbcode html code with viewer links inside

thanks



/*** do the multicodes ***/
var multi_codes_array = {
"direct-links":"<?php show_lang_txt('txt_multicodes_directlink'); ?>",
"html-codes":"<?php show_lang_txt('txt_multicodes_html'); ?>",
"bb-codes":"<?php show_lang_txt('txt_multicodes_bbcode'); ?>",
"html-thumb-codes":"<?php show_lang_txt('txt_multicodes_thumbs_html'); ?>",
"thumb-bb-codes":"<?php show_lang_txt('txt_multicodes_thumbs_bbcode'); ?>"
};
var multi_codes_textarea = {
"direct-links":"",
"html-codes":"",
"bb-codes":"",
"html-thumb-codes":"",
"thumb-bb-codes":""
};

/*** Process the ImagesObj ***/
var multiupload_thumbs = "";
$.each(ImagesObj, function(key, value) {
multiupload_thumbs += '<img src="'+value.thumb_url+'" id="'+key+'" height="'+value.thumb_height+'"/>';
multi_codes_textarea["direct-links"] += value.img_url+"\n";
multi_codes_textarea["html-codes"] += '&lt;img src="'+value.img_url+'" border="0" /&gt;'+"\n";
multi_codes_textarea["bb-codes"] += "
"+"\n";
multi_codes_textarea["html-thumb-codes"] += '&lt;a href="<?php echo __CHV_BASE_URL__; ?>?v='+value.img_name+'"&gt;&lt;img src="'+value.thumb_url+'" border="0" /&gt;&lt;/a&gt;'+"\n";
multi_codes_textarea["thumb-bb-codes"] += ""+"\n";
});
 
If you want to change all the direct links into viewer links then change in that code (multiupload_thumbs) this:
Code:
value.img_url

To this:
Code:
<?php echo __CHV_BASE_URL__; ?>?v="+value.img_name
 
ok bro updating thanks for ur help

EDIT : not work on me no multiple links appear when uploading is finished its weird :(
 
tuwebfacil said:
Thanks Rodolfo, this is very handy. Would be great to be able to modify this from the config.php or another file, so we don't have to edit this every time we do an upgrade.

Also, it is possible to get on the multi upload link the short link to direct images?
This is very handy if we want to bulk upload some files to publish to twitter or Facebook.

Regards!

Ehh... The peafow theme is a default theme. The idea is that you make your own theme :p
 
Back
Top