Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
kenspa
Hangin' Around


Joined: Sep 24, 2005
Posts: 48
Location: Spain

PostPosted: Sun Aug 12, 2018 5:04 am Reply with quote

Hi all,

I have an old mod called easy popups (Only for for admin area) to generate popups in the site and have control on them. I modified all deprecated calls, installed it on RN 2.51 and it did exactly what it is supposed to do.
The problem is:
Popups come with 500 Internal server error instead of displaying the content.
I did the following so far:
1. I tried to modify the include file (easypopups.php) which is responsible for showing the popup but no success.
2. I have included that file in includes/JavaScript.php at the end of file like this: include("includes/easypopups.php");
2. I also tried to rename/tweak my .htaccess file but no results.

I'm using the ShortLinks on my site and the nuke files are in a subfolder in the main root ( I mention that coz the server would display anything if in the root) (PHP Version 5.4.45.)

There must be something I'm not able to see especially on the JavaScript side. I really appreciate any hints.

Many Thanks
 
View user's profile Send private message
neralex
Site Admin


Joined: Aug 22, 2007
Posts: 1443

PostPosted: Mon Aug 13, 2018 9:42 am Reply with quote

kenspa, for which reason do you need popups? RavenNuke provides the colorbox to show an inline modal.

Popups are blocked by each browser since many years. So I guess this mod is older than "many years"... trashcan ftw!

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message
kenspa
PostPosted: Mon Aug 13, 2018 2:11 pm Reply with quote

Hi Neralex. I wanted to use the popups for notification to registered users as they were intended to do many many years agoooo Very Happy
And sorry, I'm not aware of the inline modal function, and if it can trigger message automatically when a user visit certain page or this function only trigger on a click??

I really appreciate your help if you could point me into the right direction about the use of inline modal for what I intended to do.

By the way, I solved the problem by changing the generated popup file extention to .html instead of .php just a few moments ago after spending a whole day on this issue Embarassed Embarassed And as you say, all browsers are set to block them, so my priority now is to discover how to automatically trigger a message (inline) to users when they visit certain mod.

Many thanks
 
neralex
PostPosted: Tue Aug 14, 2018 11:38 am Reply with quote

Can you tell me how this mod works, please?

I guess the easypopups.php generates the content of the messages, which are stored in the database and this file is called via Javasript in a popup-window?

But where is the php function placed, which decides when a popup should be generated or not. Is that a php function call, which has been added manually in different module files?
 
kenspa
PostPosted: Tue Aug 14, 2018 1:03 pm Reply with quote

There is a php part to write/edit/remove the popups in db, and there is another file in (includes) with JavaScript function to retrieve the active popups from db and set cookies with the parameters already stored in db, then create and store the popup file in a folder upon accessing the site by a user. The problem was the file generated as php with totally html content!!!

Again as you mentioned earlier, all browsers are set to block popups whatsoever. However, I have been thinking of creating a module based on the same idea, but resulting in inline "colorbox" messages which are more acceptable than the annoying popups!!!!

BTW, I think "window.onload" is the starting point to achieve triggering a message when the site loads, and I have much much javascripts to read ahead..

Cheers Wink
 
neralex
PostPosted: Tue Aug 14, 2018 3:28 pm Reply with quote

Here is an auto-open colorbox modal, which is using the content of an inline-element referenced by id. Maybe you can use is to replace the popup Javascript shizzle in your mod but you need also the rest of the sql-db calls and cookie settings. Otherwise the modal will be open after each page-reload.

Place this code after the include of the header.php and before the include of the footer.php:

php Code:
echo '<div class="display-none">', PHP_EOL # hide content, when colorbox is not open

,'<div id="cbox-test" class="text-center">HELLO WORLD!</div>', PHP_EOL #content of colorbox
,'</div>', PHP_EOL;

$cbox_test = '<script type="text/javascript">' . PHP_EOL
. ' $.colorbox({ open:true, inline:true, href:"#cbox-test", width:"600px", height:"300px" });' . PHP_EOL
. '</script>' . PHP_EOL;
addJSToBody($cbox_test,'inline');
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©