Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: mayheptad on June 18, 2018, 03:30:54 PM

Title: error while trying to installed ads management mod
Post by: mayheptad on June 18, 2018, 03:30:54 PM
hello smf community
I am a complete beginnner here
i recently installed smf 2.0.15, and i install studio theme as well
so i search the forum and i saw a mod called ads management mod
          see link here  http://custom.simplemachines.org/mods/index.php?mod=255
i downloaded and upload it, and i wen i try to install it
i saw some text  that i did not understand some write test succesfull while some write test failed
  so at the bottom of the page it show me the botton to install
but before i procedd with the installation, i screenshot the error i got here so that the expert's in here can check it for me before i continue

   please check my attachment for the error
Title: Re: error while trying to installed ads management mod
Post by: Kindred on June 18, 2018, 04:31:41 PM
So, what exactly is your question?

If the question is "should you continue the installation?"   the answer is no - unless you understand the manual code changes that you will have to make in order for the mod to work.

https://wiki.simplemachines.org/smf/Error_in_mod_installation


finally.... questions about specific mods should be asked in the thread dedicate to supporting that specific mod. :)
Title: Re: error while trying to installed ads management mod
Post by: mayheptad on June 18, 2018, 07:41:01 PM
Thanks Kindred
since this mod did not work for me and i have no coding knowledge to manuall tweak the code
pls how do i get another mod that will work perfectly and perform the same task for
my forum
Title: Re: error while trying to installed ads management mod
Post by: Kindred on June 18, 2018, 08:02:24 PM
Thing is, you may have the same or similar issues with ANY mod. Depending on what files the mod edits, what custom coding your theme has and/or what other mods you have installed.
Title: Re: error while trying to installed ads management mod
Post by: GigaWatt on June 19, 2018, 01:00:37 AM
As Kindred pointed out, there is no easy way around it. Most of the mods were tested with the default theme only (Curve). There is no way to test the mods with all available themes out there. If you want this particular mod to work with your theme (Studio if I'm not mistaken), you have to get your hands dirty. And if you choose another mod for this task, there is no guarantee that it will install and work as expected out of the box with your current theme.
Title: Re: error while trying to installed ads management mod
Post by: mayheptad on June 19, 2018, 05:07:02 AM
thanks kindred
thanks gigawats

but based on the error i screenshot above
which line of code do i need to modify to get this mod working with studio theme
 
i will be really greatfull if get a well explained tutorial to make this mod work with studio theme
Title: Re: error while trying to installed ads management mod
Post by: Illori on June 19, 2018, 05:13:42 AM
you really need to post in the mods support topic to that the author of the mod can help you further. we dont support the mods to this point. if we did then we would know then inside and out along with all themes which we dont due to how many mods/themes there are.
Title: Re: error while trying to installed ads management mod
Post by: dheeraj on June 19, 2018, 05:59:38 AM
As you have shown in the error screenshots, you have not added the code and replace the previous code, first you need to add and replace the code, then try again, the ads will show up.
Title: Re: error while trying to installed ads management mod
Post by: Kindred on June 19, 2018, 07:25:58 AM
dheeraj - you are incorrect.


mayheptad, did you read the FAQ link that I posted? 
the small pencil icon to the left of each of the errors will display the code that needs to be found and the edits that need to be made.
The issue is that the code does not match the "search for" EXACTLY - either because your theme used different coding or another mod has already edited it. So, you have to use human brainpower to find the code, even though it has been changed away form an exact match.

However -- if you post in the support topic for the mod, it is likely that someone (maybe the author, maybe another user of the mod) can help you make the edits.
Title: Re: error while trying to installed ads management mod
Post by: mayheptad on June 19, 2018, 06:42:35 PM
hi kindred
i have posted in the suport topic for the mod
and the only response i got was that i should continue with the installation


  check the response by vbgamer here in my attachment

should i do as he said ??

and my fear is that, if i should succesfully edit and modify the code and get the mod working, will it not affect another mods or the forum itself ???
Title: Re: error while trying to installed ads management mod
Post by: Kindred on June 19, 2018, 07:04:15 PM
After installing the mod, you will have to manually edit the files that failed in the studio thene.
Title: Re: error while trying to installed ads management mod
Post by: mayheptad on June 19, 2018, 07:09:21 PM
but after editing the file , will it not affect other mods or the forum itself ??
Title: Re: error while trying to installed ads management mod
Post by: br360 on June 19, 2018, 07:13:50 PM
Most likely not. If it was going to affect other mods, you would have seen more errors in installation which would let you know of conflicts with other mods.

The more mods you do install, you do have the higher chance of some not playing nicely with others, but you should be ok here. Just make sure you back up before editing any files
Title: Re: error while trying to installed ads management mod
Post by: mayheptad on June 21, 2018, 07:38:10 AM
hello
i try to install the ad management mode not minding the error.
and after the instalation, i tried to add some ads from chitika and the ads where displaying as expected.

my question is do i still need to login to my cpanel file manager
to edit and modify the line of code that display error from studio template ??

or i should just leave it since my ads are displaying
and the error is only one

the even the second error below  give me option to ignore it , which makes me think's probably the error is not that serious

  hope it will not cause me problem or break things in the future ??
Title: Re: error while trying to installed ads management mod
Post by: Kindred on June 21, 2018, 12:03:42 PM
if you don't apply those changes, you MAY have issues in the future and you probably won't have the full functionality of the mod in all places
Title: Re: error while trying to installed ads management mod
Post by: mayheptad on June 25, 2018, 03:58:52 PM
hello everyone
after i logged into my cpanel file manager  to edit the line of code that failed in studio
i open the directory where the file failed 
 
    Themes/Studio/MessageIndex.template.php
and i was looking for the pieces of code to replace, but i found two codes that look alike
so i dont really know the one to replace.
  when i click on the pencil icon on the error on studio theme
this is what it display below


Execute Modification     ./Themes/Studio/MessageIndex.template.php      Test failed


         Code: (Find) [Select]

echo '
            </tbody>
         </table>
      </div>
   </div>';




         
          Code: (Replace) [Select]


echo '
            </tbody>
         </table>
      </div>
   </div>';
   //Display Ads on the Message index
   if (function_exists("show_underchildren"))
   {
      $ads = show_underchildren();
      if(!empty($ads))
         if($ads['type']==0)
            echo $ads['content'];
         else
            eval($ads['content']);
      unset($ads);
   }

       
while i was checking the failed directory in my studio theme for the code to replace i found two code that look alike
  check below

     1.     echo 'https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts
            </tbody>
         </table>
         </div>
      </div>
   </div>';


   2.        echo '
         </tbody>
      </table>
   </div>
   <a id="bot"></a>';


These are the two codes that look likes what the studio theme is asking me to replace in that directory
but i dont really know which one to replace




secondly the next error below this one still on the same studio theme  at the front of the error i can see IGNORE ERRORS written at the front of it my question is should i ignore the error ??check my attachment to understand my question


finally
i just uninstall this mode recently. so i want to ask maybe i should install the mod before modifying the error in the studio theme ??
or i should modify the studio theme and then try to install the mod again so that i can be sure if the mod does not dectect any error again
thanks
Title: Re: error while trying to installed ads management mod
Post by: GigaWatt on June 25, 2018, 04:46:39 PM
See the notepad icon on the left? Click it, see what code needs to be replaced or added. Download the file that the installer is glitching on (preferably, through FTP), try to find the code that it's supposed to be replaced or added by the installer (there is no easy way to explain this... since the installer can't find that particular piece of code, the code has probably been modified or is not present at all, so you'd have to trust your logic and knowhow to find the exact place that that particular piece of code should be added or replaced), edit it, save the file. Do this with all of the files that the installer is failing to pass the test. Save them in folder. Install the mod even though it shows errors. Rename all of the files that it failed to edit (in your webspace) to filename.php.bak and copy your edited files in the same directories.

And this should be asked in the ads management mod thread or the theme thread.
Title: Re: error while trying to installed ads management mod
Post by: mayheptad on June 25, 2018, 07:38:31 PM
Quote from: mayheptad on June 25, 2018, 03:58:52 PM
hello everyone
after i logged into my cpanel file manager  to edit the line of code that failed in studio
i open the directory where the file failed 
 
    Themes/Studio/MessageIndex.template.php
and i was looking for the pieces of code to replace, but i found two codes that look alike
so i dont really know the one to replace.
  when i click on the pencil icon on the error on studio theme
this is what it display below


Execute Modification     ./Themes/Studio/MessageIndex.template.php      Test failed


         Code: (Find) [Select]

echo '
            </tbody>
         </table>
      </div>
   </div>';




         
          Code: (Replace) [Select]


echo '
            </tbody>
         </table>
      </div>
   </div>';
   //Display Ads on the Message index
   if (function_exists("show_underchildren"))
   {
      $ads = show_underchildren();
      if(!empty($ads))
         if($ads['type']==0)
            echo $ads['content'];
         else
            eval($ads['content']);
      unset($ads);
   }

       
while i was checking the failed directory in my studio theme for the code to replace i found two code that look alike
  check below
sorry this is exactly how the code look like
there is an error link in the one i posted above
     1.     echo '
            </tbody>
         </table>
         </div>
      </div>
   </div>';


   2.        echo '
         </tbody>
      </table>
   </div>
   <a id="bot"></a>';


These are the two codes that look likes what the studio theme is asking me to replace in that directory
but i dont really know which one to replace




secondly the next error below this one still on the same studio theme  at the front of the error i can see IGNORE ERRORS written at the front of it my question is should i ignore the error ??check my attachment to understand my question


finally
i just uninstall this mode recently. so i want to ask maybe i should install the mod before modifying the error in the studio theme ??
or i should modify the studio theme and then try to install the mod again so that i can be sure if the mod does not dectect any error again
thanks
Title: Re: error while trying to installed ads management mod
Post by: Aleksi "Lex" Kilpinen on July 14, 2018, 02:58:21 AM
Before attempting any installation after you've seen errors it's a good idea to back up first
How do I backup my SMF forum? (https://wiki.simplemachines.org/smf/How_do_I_save_my_SMF_board)
The Manual installation wiki will explain a bit on how the code edits work
Manual Installation of Mods (https://wiki.simplemachines.org/smf/Manual_installation_of_mods)