Advertisement:

Author Topic: SMF Versatile Post Reactions  (Read 4587 times)

Online shadav

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,450
  • Gender: Female
    • shadav on Facebook
    • leashadav on GitHub
    • Foamy Fanatics :: For All Your Foamy The Squirrel Needs
Re: SMF Versatile Post Reactions
« Reply #40 on: January 22, 2021, 03:34:44 AM »
just installed the update...

a few requests :) please and thank you

a way to actually edit the reactions (without having to go into the db) .... right now you can only delete and add, there's no actual way to edit them

a sort option...to pick which ones you want to show first, second, ect...so you can easily move them around

if you use different reacts that are different sizes
in sources/manageReactions.php
find
Code: [Select]
return (\'<img width="26px" height="26px" src="\'. $settings[\'default_images_url\']. \'/reactions/\'. $row[\'emoji_name\']. \'.gif" alt="\'. $row[\'emoji_title\']. \'" title="\'. $row[\'emoji_title\']. \'" />\');'replace
Code: [Select]
return (\'<img src="\'. $settings[\'default_images_url\']. \'/reactions/\'. $row[\'emoji_name\']. \'.gif" alt="\'. $row[\'emoji_title\']. \'" title="\'. $row[\'emoji_title\']. \'" />\');'
in Themes/default/css/vreactions.css
find
Code: [Select]
.emojis img {
width: 26px;
height: 26px;
}
replace
Code: [Select]
.emojis img {
}

or if you use the same sized reacts but bigger/smaller than the ones supplied just change the 26px to whatever your sizes are

a side note ;) if you want to resize your gifs or do some other edits to them, this is a decent site that I use
ezgif.com

Online shadav

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,450
  • Gender: Female
    • shadav on Facebook
    • leashadav on GitHub
    • Foamy Fanatics :: For All Your Foamy The Squirrel Needs
Re: SMF Versatile Post Reactions
« Reply #41 on: January 22, 2021, 03:43:01 AM »
well I tried....
so I was looking into how to hide the reactions until a button was clicked....

going off of this: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_toggle_hide_show

I did this....but it doesn't work
maybe it'll give someone with more knowledge some ideas though

so in vreactions.css
at the end add
Code: [Select]
#reactiontab {
  width: 100%;
  margin-top: 20px;
}

in Display.template.php
not quite sure this is right
find
Code: [Select]
//versatile reactions
loadreactionemojis($message['id'], $context['user']['id']);

replace
Code: [Select]
echo '
<button onclick="reactionFunction()">React</button>
<div id="reactiontab">';
//versatile reactions
loadreactionemojis($message['id'], $context['user']['id']);
echo '
</div>';

in vreactions.js
at the end add
Code: [Select]
function reactionFunction() {
  var x = document.getElementById("reactiontab");
  if (x.style.display === "none") {
    x.style.display = "block";
  } else {
    x.style.display = "none";
  }
}

the button shows up but clicking it doesn't do anything and the reactions aren't hidden by default, which I'm assuming is because of the function code isn't working
anyways, a start for someone else to maybe play around with

Offline camefromwpandmybb

  • Semi-Newbie
  • *
  • Posts: 32
Re: SMF Versatile Post Reactions
« Reply #42 on: June 10, 2021, 09:17:14 PM »
great mod. curious though. wouldnt it be prudent to remove the "stock" like 2.1 rc3 button?


Offline Diego Andrés

  • Customizer
  • SMF Hero
  • *
  • Posts: 3,836
  • Gender: Male
    • DiegoAndresCortes on GitHub
    • @bihgetter on Twitter
    • SMF Tricks - Free & Premium Themes
Re: SMF Versatile Post Reactions
« Reply #43 on: June 10, 2021, 09:43:11 PM »
great mod. curious though. wouldnt it be prudent to remove the "stock" like 2.1 rc3 button?

You could just disable it from the admin as both are different features

SMF Tricks - Free & Premium Responsive Themes for SMF.

Offline camefromwpandmybb

  • Semi-Newbie
  • *
  • Posts: 32
Re: SMF Versatile Post Reactions
« Reply #44 on: June 10, 2021, 10:21:46 PM »
lol. imma dummy.  thx

Offline StarredSkies

  • Jr. Member
  • **
  • Posts: 106
    • Beasts of Beyond
Re: SMF Versatile Post Reactions
« Reply #45 on: June 18, 2021, 08:13:16 PM »
This is a fantastic mod that strays from the regular reactions modifications I see. Almost reminds me of Discord emotes. Thank you!