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

peafowl.php gone; how do I now ad spaces between thumbs?

dotch

Chevereto Member
In 2.3 and before I used to tweak \content\system\js\peafowl.php a bit to make the scrip ad spaces between thumbs when multi-uploading images an put them in horizontal lines, rather than below each other. I simply replaced the \n with a blank space (see code below). In 2.4 peafowl.php is gone and I can't find the code below elswhere. So, how can I make Chevereto 2.4 ad spaces between thumbs in the multi-code ouput?

Thanks!
 
Change this:
PHP:
<?php show_images_bbcode(); ?>

To this:
PHP:
<?php show_images_bbcode(' '); ?>

It applies to any show_images_ template tag.
 
Example (all image hosts I know process the code like this). Note there's a space between the images and in the BBCode too. So it's a space, in stead of a return (\n)

Code:
[url=http://mysite.com/image/f1][img]http://mysite.com/images/2012/09/29/pYM6s.th.jpg[/img][/url] [url=http://mysite.com/image/f2][img]http://mysite.com/images/2012/09/29/3P7MU.th.jpg[/img][/url] [url=http://mysite.com/image/fI][img]http://mysite.com/images/2012/09/29/6vQNs.th.jpg[/img][/url]

[image removed]
 
Yes, I know that... I need to see the code that you are using to display the BBCodes
 
OK in my current Chevereto site 2.3.1 I've changed \content\system\js\peafowl.php

Code:
 multi_codes_textarea["html-thumb-codes"] += '&lt;a href="'+html_codes_href+'"&gt;&lt;img src="'+value.image_thumb_url+'" border="0" /&gt;&lt;/a&gt;'+"\n";
        multi_codes_textarea["thumb-bb-codes"] += "[url="+bb_codes_href+"][img]"+value.image_thumb_url+"[/img][/url]"+"\n";


into:
Code:
multi_codes_textarea["html-thumb-codes"] += '&lt;a href="'+html_codes_href+'"&gt;&lt;img src="'+value.image_thumb_url+'" border="0" /&gt;&lt;/a&gt;'+" ";
            multi_codes_textarea["thumb-bb-codes"] += "[url="+bb_codes_href+"][img]"+value.image_thumb_url+"[/img][/url]"+" ";

So this is the code'I simpy changed \n into a space, and it worked. I did not change anything else
 
Like I said... On 2.4 there is no peafowl.php and to customize the output you have to use the template tags. On 2.4 you should do this and you will get the spaces (you need to be running 2.4)

The 2.3 workaround isn't compatible with 2.4 and the workaround used on 2.4 can't be applied to 2.3. So if you are in 2.3 you have to do the Javascript edit and if you are in 2.4 simply change the template tag arguments.
 
Like I said... On 2.4 there is no peafowl.php and to customize the output you have to use the template tags. On 2.4 you should do this and you will get the spaces (you need to be running 2.4)

Like Rodoflo said, we are happy to offer support to our customer, but we will not offer support for features implemented in later versions of the script. You will have either to upgrade or ask a private developer to develop this for you. We strongly recommend you to always keep your chevereto up to date.
 
Thanks for the replies. I upgraded to 2.4, I but went back to 2.3 just temporary because I would like the same design and functionality as my current 2.3 site. I solved the problem with the default minified CSS and now I want to solve the problem that peafowl.php is gone in 2.4 and I don't know how to ad spaces between thumbs in 2.4.

I think spaces between thumbs should be part of Chevereto's default behavior, because no forum-poster, blogger, or webmaster who uses my site would like the thumbs appear like this:

[image]
[image]
[image]
etc. etc. etc.

I know that I have in to change in 2.4

Code:
<?php show_images_bbcode(); ?>

To this:

Code:
<?php show_images_bbcode(' '); ?>

I guess that's in \content\themes\Peafowl\uploaded.php (?)

I tried, but couldn't get it to work. I'm not familiar with words like "template tags". Can you specify on which line numbers (in Notepad++) I have to make the changes above, so that I get spaces (and no returns) between thumbs + html and thumbs + BBCode?

Thanks, sorry I'm not a geek, but I do my very best to become one :D Any help is really appreciated!
 
Problem is that the instruction is wrong, this is the code:
PHP:
<?php show_images_bbcode('default', ' '); ?>

Regarding why this new line is default, is because using new lines or spaces is just matter of the user taste. Some users will want to have this on new lines, others using spaces etc. So is up to you how you will display this.
 
Still can't get it to work :confused:

So if I want spaces between thumbs I have to change line 23 and 24 of \chevereto\content\themes\Peafowl\uploaded.php?

Code:
23:            <textarea id="html-thumb-codes" readonly="readonly"><?php show_images_thumbs_linked_html(); ?></textarea>
24:            <textarea id="thumb-bb-codes" readonly="readonly"><?php show_images_thumbs_linked_bbcode(); ?></textarea>

into:
Code:
23:            <textarea id="html-thumb-codes" readonly="readonly"><?php show_images_thumbs_linked_html('default', ' '); ?></textarea>
24:            <textarea id="thumb-bb-codes" readonly="readonly"><?php show_images_thumbs_linked_bbcode('default', ' '); ?></textarea>
 
Try this.. is the new default code for 2.4.3:
Code:
        <div id="multi-codes">
            <select>
                <option value="short-urls-internal" selected="selected"><?php show_lang_txt("txt_show_directly_shorturl"); ?></option>
                <option value="direct-links"><?php show_lang_txt("txt_multicodes_directlink"); ?></option>
                <?php if(has_images_shorturls_service()) : ?><option value="short-urls-service"><?php show_tinyurl_service(); ?></option><?php endif; ?>
                <option value="html-codes"><?php show_lang_txt("txt_multicodes_html"); ?></option>
                <option value="bb-codes"><?php show_lang_txt("txt_multicodes_bbcode"); ?></option>
                <option value="html-thumb-codes"><?php show_lang_txt("txt_multicodes_thumbs_html"); ?></option>
                <option value="thumb-bb-codes"><?php show_lang_txt("txt_multicodes_thumbs_bbcode"); ?></option>
            </select>
            <textarea id="short-urls-internal" readonly="readonly" style="display: block;"><?php show_images_shorturls('\n'); ?></textarea>
            <textarea id="direct-links" readonly="readonly"><?php show_images_urls('\n'); ?></textarea>
            <?php if(has_images_shorturls_service()) : ?><textarea id="short-urls-service" readonly="readonly"><?php show_images_shorturls_service('\n'); ?></textarea><?php endif; ?>
            <textarea id="html-codes" readonly="readonly"><?php show_images_html('<img src="%IMAGE_URL%" alt="%IMAGE_FILENAME%" border="0" />', ' '); ?></textarea>
            <textarea id="bb-codes" readonly="readonly"><?php show_images_bbcode('[img]%IMAGE_URL%[/img]', ' '); ?></textarea>
            <textarea id="html-thumb-codes" readonly="readonly"><?php show_images_thumbs_linked_html('shorturl', 'blank', '<img src="%IMAGE_URL%" alt="%IMAGE_FILENAME%" border="0" />', ' '); ?></textarea>
            <textarea id="thumb-bb-codes" readonly="readonly"><?php show_images_thumbs_linked_bbcode('shorturl', 'blank', '[img]%IMAGE_URL%[/img]', ' '); ?></textarea>
        </div>
 
Now there are no thumbnails at all. I noticed that the Chevereto Demo doesn't show thumbs either at the moment.
 
Code:
<textarea id="html-thumb-codes" readonly="readonly"><?php show_images_thumbs_linked_html('shorturl', 'blank', '<img src="%IMAGE_THUMB_URL%" alt="%IMAGE_FILENAME%" border="0" />', ' '); ?></textarea>
<textarea id="thumb-bb-codes" readonly="readonly"><?php show_images_thumbs_linked_bbcode('shorturl', 'blank', '[img]%IMAGE_THUMB_URL%[/img]', ' '); ?></textarea>
 
Back
Top