News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

error while trying to installed ads management mod

Started by mayheptad, June 18, 2018, 03:30:54 PM

Previous topic - Next topic

mayheptad

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

Kindred

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. :)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mayheptad

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

Kindred

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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

GigaWatt

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.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

mayheptad

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

Illori

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.

dheeraj

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.

Kindred

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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mayheptad

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 ???

Kindred

#10
After installing the mod, you will have to manually edit the files that failed in the studio thene.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mayheptad

but after editing the file , will it not affect other mods or the forum itself ??

br360

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

mayheptad

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 ??

Kindred

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
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mayheptad

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

GigaWatt

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.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

mayheptad

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

Aleksi "Lex" Kilpinen

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?
The Manual installation wiki will explain a bit on how the code edits work
Manual Installation of Mods
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: