Jump to content

SeNioR-

Members
  • Posts

    1,154
  • Joined

  • Days Won

    5

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Posts posted by SeNioR-

  1. Hey, devs. I have a question about converting image attachments.

    So, if we use Imagick, PNG images are not compressed at all. 8 out of 10 images that I uploaded to the post have a larger file size than before uploading (lol).

    I wrote some code to compress PNG images (by changing the format to webp) and the size dropped by about 80% (sic!), however I need code to save the output file in .webp format. 

    Can anyone direct me how to change the output format after uploading?

    /* Get Format */
    $format = $this->imagick->getImageFormat();
    	      
    /* Set PNG */
    if( mb_strtolower( $format ) == 'png' )
    {
    $this->imagick->setImageFormat('webp');
    $this->imagick->setOption('webp:filter-strength', '20');
    $this->imagick->setOption('webp:filter-type', '0');
    $this->imagick->setOption('webp:method', '3');
    $this->imagick->setImageCompressionQuality( 85 );
    }
  2. @Daniel F nice 🙂

    Tag management should be built in. There have already been many suggestions to add a list of tags.

    Personally, for my own needs, I had to write my application to remove thousands of unnecessary tags that were added automatically based on the topic title. (At the time I thought auto tags were a great SEO thing LOL 🙄).

  3. Hi Guys. On many websites, when registering an account, there are only two fields, e-mail address and password. The username is set based on the email address, usually in its entirety or set based on what comes before the @ symbol e.g.

    • emial: olivia.johnson@coldmail.com
    • Username: Olivia.johnson

    My primitive working code looks like this:

    $GetNameEmail = substr($values['email_address'], 0, strrpos($values['email_address'], '@'));
    $member->name    = ucfirst($GetNameEmail);

    Could contain: Page, Text

    I need to check if username is already in the database. How can I achieve it? Something like when registering via the social media method where if the nick is taken, we have to enter a different one.

     

  4. Since the topic author cannot mark his first post as solved, this code below should not show if there is no reply in the topic.

    {{if $topic->canSolve() AND ! $topic->isSolved() AND $topic->isNotModeratorButCanSolve()}}
    <div class='cContentMessage cContentMessage_color ipsMessage_success ipsMargin_vertical' data-controller='forums.front.topic.solved'>
        <h3 class='cContentMessage__header'>{lang="solved_did_it_tho_title" sprintf="\IPS\Member::loggedIn()->name"}</h3>
        <div class='ipsPadding'>
            {lang="solved_did_it_tho_desc"}
            {{if member.members_bitoptions['no_solved_reenage']}}
    			<div class='ipsMargin_top'>
    				<a href="#" data-action="mailSolvedReminders" class="ipsButton ipsButton_verySmall"><i class="fa fa-envelope"></i>&nbsp; {lang="solved_reengage_on"}</a>
    			</div>
            {{endif}}
        </div>
    </div>
    {{endif}}

    FIX:

    $topic->posts > 1 
  5. @teraßyte I know that but then on a real mobile device there are too many buttons and they start to be on two lines.

    If we are on a desktop, the buttons should correspond to those set in ACP.

    In this case, the buttons set for the mobile device are displayed on the desktop when editing. I think that's understandable? 🙂

×
×
  • Create New...