last day (15 days later) » 

12:21 PM
0
Q: poup show massage

Tose Sharefi Have a block and i wanna to show here content on popup show massage function darksite_block_view($delta = '') { switch ($delta) { case 'popup_dark_screen': $block['subject'] = t('Pop up Dark Screen'); $block['content'] = get_darksite_popup(); } return $block; } functi...

 
what is it not working for you? is it making it popup or getting the message?
 
the code does not work I mean dose not work popup
 
have you tried it without the print? just popup_message_show_message($popup_message_parameters);
and when do you want to display the popup?
 
on the front page
 
do you want to show the same message or does the message depend on something?
 
12:21 PM
i would to show the same massage as on block contant
 
from were are you calling get_darksite_popup
not on skype at the moment.
 
ok i am here
 
ok
show me the full code
 
<?php

function darksite_menu() {
$items['admin/config/media/darksite'] = array(
'title' => 'Pop up screen configuration',
'page callback' => 'drupal_get_form',
'page arguments' => array('darksite_config_page'),
'access arguments' => array('adminster pop up dark screen'),
'type' => MENU_NORMAL_ITEM
);

return $items;
}

function darksite_config_page() {
$form['darksite_status'] = array(
'#title' => t('Enable pop up screen'),
'#description' => t('When enabled, a pop up screen will be displayed on the home page.'),
 
have you placed the block in some region?
 
12:29 PM
yes
i have
 
and do you see the block in the page?
and have you installed the module drupal.org/project/popup_message
 
no i did not but when i print_r for the content it is show the content
yes i have
 
function darksite_block_view($delta = '') {
switch ($delta) {
case 'popup_dark_screen':
$block['subject'] = t('Pop up Dark Screen');
$block['content'] = t('Testing Block');
get_darksite_popup();
}

return $block;
}
can you try this code instead of the other function and let me know if you see the block with the testing as content
 
is still not work
 
do you see the block in the front page?
and can you try the popup_message_show_message($popup_message_parameters); out side the if condition
 
12:46 PM
just wait
 
by the way you also have to make it 'check_cookie' => FALSE,
 
as requirement
 
as requirement?
what is the requirement?
 
1:03 PM
the requirement of site
my manger tell me to do that
 
what is the requirement of the site?
and what is the message you are going to display?
if you just want to display a message when user comes for the first time then the popup module is enough you dont have to do any programming
just set the message in the configuration page of popup message and then set the permission to make it visible to anonymous users
 
if we have any bad event it must shown on the front page on first visit the user with history
i have made the permission
 
it did not work?
 
yes it sill not work
 
It will only be shown once so if you want to see it again you will have to clear the browser cache
I will have to leave now Will be online after sometime.
 
1:13 PM
i have try every method but it still not work
 

last day (15 days later) »