We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Please add PNG format and why it does not work. - Smileys | Forum

Kenneth
Kenneth Oct 27 '13
Please allow PNG files. My PNG icons loose transparency when you convert them to .gif
The Forum post is edited by Kenneth Jan 6 '14
Kairat Bakitow
Kairat Bakitow Dec 22 '13

most .png files loose transparence. I had many problems with this format. And if I add this format I, probably, will have many questions and problems. But if realy want - do next code modifications:


1. Open the file: ow_plugins/smileys/controllers/admin.php

2. Find next code (line number 115):


if( $_FILES['smileys']['type'][$key] != 'image/gif' )


and replace on this


if( !in_array($_FILES['smileys']['type'][$key], array('image/gif', 'image/png')) )


2. Find next code (line nimber 121):


if ( preg_match('/^[[:word:] -]{1,20}.gif$/', $_FILES['smileys']['name'][$key]) === 0 )


and replace on this


if ( preg_match('/^[[:word:] -]{1,20}.(?:gif|png)$/i', $_FILES['smileys']['name'][$key]) === 0 )


At your own risk

Kenneth
Kenneth Dec 30 '13
Quote from Kairat Bakitow

most .png files loose transparence. I had many problems with this format. And if I add this format I, probably, will have many questions and problems. But if realy want - do next code modifications:


1. Open the file: ow_plugins/smileys/controllers/admin.php

2. Find next code (line number 115):


if( $_FILES['smileys']['type'][$key] != 'image/gif' )


and replace on this


if( !in_array($_FILES['smileys']['type'][$key], array('image/gif', 'image/png')) )


2. Find next code (line nimber 121):


if ( preg_match('/^[[:word:] -]{1,20}.gif$/', $_FILES['smileys']['name'][$key]) === 0 )


and replace on this


if ( preg_match('/^[[:word:] -]{1,20}.(?:gif|png)$/i', $_FILES['smileys']['name'][$key]) === 0 )


At your own risk


I think there is a code error. They will upload and show but when you click them the show up as this "
alyx.png.gif" instead of just the .png which means they won't show till the suto .gif goes away. Let me know if you can see how this is happening in the code. Images work perfect just when you import them into a post they somehow get a alyx.png.gif which could never work unless I can get rid of the .gif
Kenneth
Kenneth Dec 30 '13
I have attached a file showing the element and what is going on.
Attachments:
  issue.png (717.2Kb)
Abou
Abou Feb 18 '14
dont work sir please fix this problem !!! i want use PNG format
Abou
Abou Feb 18 '14
it's very important!!!
Kenneth
Kenneth Mar 5 '14
I don't believe it will be fixed, It's something within the code I have tried a few options something without the code automatically adds .gif even if you remove .gif all together.
You do not have permission to reply this topic