981
Mamba
Re: Mastop_publish erro Xoops2.5.10
  • 2021/2/6 4:10

  • Mamba

  • Moderator

  • Posts: 11375

  • Since: 2004/4/23


Publisher is currently the best alternative:
https://github.com/XoopsModules25x/publisher
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



982
Mamba
Re: Donat-O-Meter isn
  • 2021/2/6 4:08

  • Mamba

  • Moderator

  • Posts: 11375

  • Since: 2004/4/23


Thank you for your donation that we have received!

It is very much appreciated!
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



983
edipinho
Re: Mastop_publish erro Xoops2.5.10
  • 2021/2/6 3:04

  • edipinho

  • Not too shy to talk

  • Posts: 107

  • Since: 2003/10/15


Excuses I just found, maybe it was despair.

https://github.com/XoopsModulesArchive/mastop_publish



984
edipinho
Mastop_publish erro Xoops2.5.10
  • 2021/2/6 2:15

  • edipinho

  • Not too shy to talk

  • Posts: 107

  • Since: 2003/10/15


How do I get the mastop_publish module to work on Xoops 2.5.10 with PHP7.x, I tried to update and there was an error in this module.

>> Database ok
>> Erro: Error: Class 'XoopsModules/Mastoppublish/Helper' not found arquivo /modules/mastop_publish/admin/menu.php linha 19

<?php
### =============================================================
### Mastop InfoDigital - Paixão por Internet
### =============================================================
### Menu da Administração
### =============================================================
### Developer: Fernando Santos (topet05), fernando@mastop.com.br
### Copyright: Mastop InfoDigital - 2003-2006
### -------------------------------------------------------------
### www.mastop.com.br
### =============================================================
###
### =============================================================

use XoopsModulesMastoppublish;

// require_once __DIR__ . '/../class/Helper.php';
//require_once __DIR__ . '/../include/common.php';
/*L19 ==>>*/ 
$helper MastoppublishHelper::getInstance();

$pathIcon32 XmfModuleAdmin::menuIconPath('');
$pathModIcon32 $helper->getModule()->getInfo('modicons32');


The site is from an association that has been active since the year 2004 and I updated to Xoops 2.0.16.

HostGator tried to block me because I was very insecure, but it gave me until March to resolve it.

Please, I'm looking for an alternative module but, I'm not finding it, I saw someone on the forum here, I think it was Mamba, giving an alternative but, I lost the link, any help is welcome.



985
BigKev73
Re: Adding a LIke Feature to NEWBB
  • 2021/2/5 21:17

  • BigKev73

  • Just popping in

  • Posts: 13

  • Since: 2021/1/26


I've updated the zip file. I found a minor issue in the ReactionUsers.php where the image links were not correct in the "users popup", after some late changes I made. That has now been corrected. Thanks!



986
BigKev73
Re: Adding a LIke Feature to NEWBB
  • 2021/2/5 18:35

  • BigKev73

  • Just popping in

  • Posts: 13

  • Since: 2021/1/26


Ok here is the DL link for the Reaction Plug and here are the instructions for installing it (also included in the zip file). Please read through the entire thing before starting. I think its a pretty easy add and i've tested it on my website which is running :

XOOPS Version XOOPS 2.5.11-Beta1
PHP Version 7.4.14
mySQL Version 5.5.68-MariaDB

That being said, use at your own risk and peril.

ReactionPlugin Download



Instructions for installing the Reactions Plug-In:

These instructions are for installing into NEWBB, but the premise and file locations should be similar for each module. Please adapt as you see fit and test this on a non-production website before deploying.

Copy this entire directory to the root of the /modules/newbb folder

So it the files should end up in the following locations:

/modules/newbb/Reaction.php
/modules/newbb/class/ReactionDBCreator.php
/modules/newbb/class/ReactionEntry.php
/modules/newbb/class/ReactionUsers.php
/modules/newbb/class/ReactUpdate.php
/modules/newbb/class/ReactionEntryHandler.php
/modules/newbb/class/ReactionInfo.php
/modules/newbb/include/AddReact.js
/modules/newbb/images/Like.png
/modules/newbb/images/Love.png
/modules/newbb/images/Hug.png
/modules/newbb/images/Laugh.png
/modules/newbb/images/Wow.png
/modules/newbb/images/Sad.png
/modules/newbb/images/Hate.png

You can modify the ReactionInfo.php file to add additional reaction or remove ones you don't want by modifying the define("ReactionNames", array("Like","Love","Hug","Laugh","Wow","Sad","Hate")); constant. The names much match the base names in the images folder.

You can change the DB Table name by modifying the define("ReactionTableName", "reaction_entry");
The table prefix is automatically added. Only 1 table is needed regardless of how many modules may be using it. So this is why the table name does not include a module name.

Once you have the DB Table name how you want it, run the /modules/newbb/class/ReactionDBCreator.php to create the table. This only had to be done once. You can delete this file afterward if you wish. But it checks if the table already exists and bails out if it does. So there is no danger to leaving it.


We need to manually modify 2 of the newbb files to support this. Please backup your files in the event you need to roll back or want to remove this plugin.


Modifications needed to NEWBB files:


In file: /modules/newbb/include/images.php , around 46 change it from:

$forumImage['previous'] = $forumImage['next'] = $forumImage['right'] = $forumImage['down'] = $forumImage['up'] = $forumImage['printer'] =  $forumImage['new_forum'] =


To:

$forumImage['previous'] = $forumImage['next'] = $forumImage['right'] = $forumImage['down'] = $forumImage['up'] = $forumImage['printer'] = $forumImage['react'] =  $forumImage['new_forum'] =


Make sure the = (equal) signs are present above at the end of the line.



In file: /modules/newbb/class/Post.php ,around line 648 insert the following line:

//Added to support Reaction    
    
include_once($GLOBALS['xoops']->path('modules/newbb/Reaction.php'));
    
$thread_action['react']['text'] =  BuildButtonsForm($post_id);


So when done it should look something like the following.

if ($topicHandler->getPermission($forum_id$topic_status'print')) {
            
$thread_action['print']['image']  = newbbDisplayImage('printer'_MD_NEWBB_PRINT);
            
$thread_action['print']['link']   = XOOPS_URL '/modules/newbb/print.php?form=2&amp;forum=' $forum_id '&amp;topic_id=' $topic_id;
            
$thread_action['print']['name']   = _MD_NEWBB_PRINT;
            
$thread_action['print']['target'] = '_blank';
  }

 
//Added to support Reaction
 
include_once($GLOBALS['xoops']->path('modules/newbb/Reaction.php'));
 
$thread_action['react']['text'] =  BuildButtonsForm($post_id);
            
 if (
$GLOBALS['xoopsModuleConfig']['show_sociallinks']) {
            
$full_title  $this->getVar('subject');
            
$clean_title preg_replace('/[^A-Za-z0-9-]+/''+'$this->getVar('subject'));


Basically, we are inserting it on the post footer between the print button and the social links. But if you wanted to move it, you could.

And that should be it. Once this is all in place, you should see the row of reaction icons at the bottom of each post when viewing a thread. Anytime a post has a reaction to it, it will show a (#) after the row icons to show how many reactions it has. Click on that opens a pop-up that shows what users reacted to it and how they reacted.

If you are a logged-in user, you can click any of the Icon to set your reaction to a post. That icon should show about 1/3rd larger to denote that if your reaction to it. If click another reaction on the same post, then it will reset to the new one. If you select the denoted icon, remove your reaction. You can only have 1 reaction to a single post.

If you look at the code added to the Post.php, the call to BuildButtonsForm does all the work for building the icons. You pass in the PostID that is how it knows what post you are on and uses that to store the value in the database.

So this can easily be added to another module. The code automatically detects what module it is installed under and uses that module's ID when storing reactions in the database. so only one table is needed regardless of the number of modules using it.

Hope this is helpful

-BigKev73



987
Dante7237
Re: Donat-O-Meter isn
  • 2021/2/5 12:07

  • Dante7237

  • Friend of XOOPS

  • Posts: 294

  • Since: 2008/5/28


Never mind.
The amounts aren't defined so it won't do anything but "other" in the amounts...

Remove that option since it's useless...

The easier these things are, the more likely you'll see interaction.
Have a great day, I have no doubt you'll be seeing me soon as I resurrect my XOOPS install from the ashes.




988
BigKev73
Re: Adding a LIke Feature to NEWBB
  • 2021/2/5 1:05

  • BigKev73

  • Just popping in

  • Posts: 13

  • Since: 2021/1/26


Ok, I made some significant changes. Take a look at this screen shot:

Resized Image


Basically in the footer section of each post in NEWBB, you will see 6 different "Reaction" icons. If you're a logged-in user, you can choose one. It will only allow you to select one at a time. The selected one becomes larger to show that is the one you selected for that particular post. If you select the same one again the in un-selects it. Also, you see the Reaction count to the right change as you make a selection. Clicking on the count shows the pop-up that shows the reactions that have been set for that post. You can click on a user there and it will take you to their profile page.

If you are not logged in (an anonymous user) then it will still show the icons, but you cant select any of them aka they do nothing, But, they can still see the Reaction count and view the pop-up.

It appears to work great, I'll have my users play with it for a bit. I figured out how to splice it into NEWBB with only a few minor manual changes. I still need to write some code to create the DB table automatically.

I rewrote this to be agnostic. The DB table has an ID, a Module ID, an Item ID, UID, ReactID and a Date

This allows it to work for any module. In the case of NEWBB it sets it Module ID, and then the Item ID is the Post ID. The React ID is the code for the reaction 0 = Like, 6 = Hate, etc.

It uses a couple of new PHP Class files and a JS file that wires up all the Reaction buttons so no page refresh is required when a user makes a section. The buttons are wired to call into the JS file and pass ItemID and ReactID assigned to the button. The JS code then checks to see if any other reaction for the post from that user was already chosen. If so, it resets it and updated the DB via a call to a PHP page that handles that. The JS code then takes care of updating the page buttons and react count as appropriately, without having the refresh the page. Once this is wired into NEWBB with the few minor changes, it should be possible to add more reaction choices without any further code changes in NEWBB as really new thinks it's only adding a single button. But it really injects an HTML form with all the buttons that are part of it. So from that standpoint, it's extendable. Also, the same thing should work for just about any other module as well.

I'm going to let my users beat it up for a few days which I get the DB Table creation code written, then I'll post some files and instructions on how to wire it up.



989
Mamba
Re: Donat-O-Meter isn
  • 2021/2/4 10:22

  • Mamba

  • Moderator

  • Posts: 11375

  • Since: 2004/4/23


You should be able to click on the green button "Submit donation" and you should be redirected to PayPal, where you can define how much money you want to donate.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



990
Dante7237
Re: Donat-O-Meter isn

I was trying to donate.
The amount is only listed as "other".
And won't complete anything from that point.
(I took a screenshot but that won't do us any good here, can't upload it)
(and now I get 120 second timeout when I edit the message....)




TopTop
« 1 ... 96 97 98 (99) 100 101 102 ... 29424 »



Login

Who's Online

270 user(s) are online (202 user(s) are browsing Support Forums)


Members: 0


Guests: 270


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jun 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits