A question about using CZModules Block and the CZHide-Blocks

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   A question about using CZModules Block and the CZHide-Blocks
Debbi
CZ Newbie
 Codezwiz Site Donator
Debbi has been a member for over 20 year's 20 Year Member
usa.gif kentucky.gif
Age: 68
Gender: Female
Website:
Status: Offline
Joined: Dec 19, 2004
0.00 posts per day
Posts: 9
Points: 1,572
   
Firstly, I've come to realize that the Modules block is a "must have". I love everything about it. I do have some stretching problems and would love to be able to use the CZHide-Blocks as well. I attempted to edit the code in admin/modules/modules.php but was unsuccessful. I'm usually able to figure out simple things, as I've done a lot of php modifications in the past, but I'm afraid this was over my head. I understand if this isn't possible but I thought I'd at least ask. icon_mrgreen.gif



Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Sure no problem what part are you having problems with?




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: A question about using CZModules Block and the CZHide-Bl
Debbi
CZ Newbie
 Codezwiz Site Donator
Debbi has been a member for over 20 year's 20 Year Member
usa.gif kentucky.gif
Age: 68
Gender: Female
Website:
Status: Offline
Joined: Dec 19, 2004
0.00 posts per day
Posts: 9
Points: 1,572
   
OK where the mod says in admin/modules/modules.php
#
#-----[ FIND ]------------------------------------------
#
(TIP: its in the function module_edit() )

    $row = $db->sql_fetchrow($db->sql_query("SELECT title, custom_title, view, inmenu, mod_group from " . $prefix . "_modules where mid='$mid'"));

#
#-----[ REPLACE, WITH ]------------------------------------------
#
    $row = $db->sql_fetchrow($db->sql_query("SELECT * from " . $prefix . "_modules where mid='$mid'"));

I don't have that line. I have
    case "module_edit":
    global  $prefix, $db, $bgcolor1, $bgcolor2;
    $mid = intval($mid);
    $result = $db->sql_query("select * from ".$prefix."_modules where mid='$mid'");
    $mid_info = $db->sql_fetchrow($result);

Also don't have this
#
#-----[ FIND ]------------------------------------------
#

    $result = $db->sql_query("update " . $prefix . "_modules set custom_title='$custom_title', view='$view', inmenu='$inmenu', mod_group='$mod_group' where mid='$mid'");

#
#-----[ REPLACE WITH ]------------------------------------------
#

    $result = $db->sql_query("update " . $prefix . "_modules set custom_title='$custom_title', view='$view', inmenu='$inmenu', mod_group='$mod_group', hideleft='$hideleft', hideright='$hideright' where mid='$mid'");

And lastly
#
#-----[ FIND ]------------------------------------------
#
function module_edit_save($mid, $custom_title, $view, $inmenu, $mod_group)

#
#-----[ REPLACE WITH ]------------------------------------------
#

function module_edit_save($mid, $custom_title, $view, $inmenu, $mod_group, $hideleft, $hideright)

I have
    case "module_edit_save":
    global  $prefix, $db;
    $mid = intval($mid);
    $view = intval($view);
    $inmenu = intval($inmenu);
    $mcat = intval($mcat);
    $mcat = explode("-", $mcat);
    if ($mcat[1]=="") { $mcat[1] = 0; }
    if ($view != 1) { $mod_group = 0; }
    $result = $db->sql_query("update ".$prefix."_modules set custom_title='$custom_title', view='$view', inmenu='$inmenu', mod_group='$mod_group', mcid='$mcat[0]', url='$url' where mid='$mid'");
    Header("Location: admin.php?op=modules");
    break;

Those are my stumping points. The rest, no problem. I can see the coding is different than in the original file (admin/modules/modules.php) but I can't figure out how to edit those three things. I was able to edit the original file easily but I really want to use CZModules instead. Thanks for your time and if it's too much trouble I do understand.


Back to top Reply with quote
#4   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Ok there is just one that concerns me that is the


#
#-----[ FIND ]------------------------------------------
#

    $result = $db->sql_query("update " . $prefix . "_modules set custom_title='$custom_title', view='$view', inmenu='$inmenu', mod_group='$mod_group' where mid='$mid'");

#
#-----[ REPLACE WITH ]------------------------------------------
#

    $result = $db->sql_query("update " . $prefix . "_modules set custom_title='$custom_title', view='$view', inmenu='$inmenu', mod_group='$mod_group', hideleft='$hideleft', hideright='$hideright' where mid='$mid'");



Just replace this case"modules_edit_save":



    case "module_edit_save":
    global  $prefix, $db;
    $mid = intval($mid);
    $view = intval($view);
    $inmenu = intval($inmenu);
    $hideleft = intval($hideleft);
    $hideright = intval($hideright);
    $mcat = intval($mcat);
    $mcat = explode("-", $mcat);
    if ($mcat[1]=="") { $mcat[1] = 0; }
    if ($view != 1) { $mod_group = 0; }
    $result = $db->sql_query("update " . $prefix . "_modules set custom_title='$custom_title', view='$view', inmenu='$inmenu', mod_group='$mod_group', mcid='$mcat[0]', url='$url', hideleft='$hideleft', hideright='$hideright' where mid='$mid'");
    Header("Location: admin.php?op=modules");
    break;


After that it should be ok let me know.



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   re: A question about using CZModules Block and the CZHide-Bl
Debbi
CZ Newbie
 Codezwiz Site Donator
Debbi has been a member for over 20 year's 20 Year Member
usa.gif kentucky.gif
Age: 68
Gender: Female
Website:
Status: Offline
Joined: Dec 19, 2004
0.00 posts per day
Posts: 9
Points: 1,572
   
That did it telli. Thank you so very much. Can't tell you how much I appreciate it.



Back to top Reply with quote
#6   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
No problem glad you got it worked out.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#7   re: A question about using CZModules Block and the CZHide-Bl
Debbi
CZ Newbie
 Codezwiz Site Donator
Debbi has been a member for over 20 year's 20 Year Member
usa.gif kentucky.gif
Age: 68
Gender: Female
Website:
Status: Offline
Joined: Dec 19, 2004
0.00 posts per day
Posts: 9
Points: 1,572
   
And I'm getting the hang of how to use it. Like assigning a category before activating a new module LOL. Live and learn. Really helps to be able to have my forums without the left side block, along with some other modules that were messing up a few of my themes. Great mod, great support.



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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 cannot attach files in this forum
You cannot download files in this forum