acp logs setup

Discussion forum for MOD Writers regarding MOD Development.
Locked
xenador
Registered User
Posts: 89
Joined: Wed Nov 22, 2006 1:27 am

acp logs setup

Post by xenador »

I suck at coding so I am following the acp logs section code for an example. I cant seem to figure out how it calls the last part that gets added to the url 'confirm_key=' when I get to this point on my moded version it just returns 'Module not accessible'
User avatar
stickerboy
Former Team Member
Posts: 7349
Joined: Mon Mar 29, 2004 2:27 pm
Location: Scotland
Name: Kenny Cameron
Contact:

Re: acp logs setup

Post by stickerboy »

MOD Writers would be a more appropriate forum for this, so moved to there :)
I'm a web-designing code-decrypting tech-support musician
|| Twitter || Flickr || phpBB Snippets ||
Formerly known as cherokee red
xenador
Registered User
Posts: 89
Joined: Wed Nov 22, 2006 1:27 am

Re: acp logs setup

Post by xenador »

my bad, thanks for putting it in the right spot.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: acp logs setup

Post by david63 »

A bit more information would be useful - such as the code that you are working with and what exactly you are trying to do.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
xenador
Registered User
Posts: 89
Joined: Wed Nov 22, 2006 1:27 am

Re: acp logs setup

Post by xenador »

ok so I am trying to figure out this whole confirm box process...I am confused at this point...

basically what I have is a module called ACP_CAT_K_MODS_MANAGE[acp_k_modules], (part of the stargate portal) and basically the module allows me to delete rows from my contact table K_CONTACT_TABLE (phpbb_k_contact) and I decided that the user should confirm the deletion...so I looked and saw that the log module also did this same operation. So I took that code and changed the variables. I got it to display properly but after confirming the deletion it adds "confirm_key= somenumber" and shows "General Error
Module not accessible" the code for the confirmbox is as follow (and this is the part I dont get at all)

Code: Select all

if (confirm_box(true))
			{
				$where_sql = '';

				if ($deletemark && sizeof($marked))
				{
					$sql_in = array();
					foreach ($marked as $mark)
					{
						$sql_in[] = $mark;
					}
					$where_sql = ' AND ' . $db->sql_in_set('id', $sql_in);
					unset($sql_in);
				}

				if ($where_sql || $deleteall)
				{
					$sql = 'DELETE FROM ' . K_CONTACT_TABLE . "
						WHERE log_type = {$this->log_type}
						$where_sql";
					$db->sql_query($sql);
				}
			}
			else
			{
				confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
					'f'			=> $forum_id,
					'start'		=> $start,
					'delmarked'	=> $deletemark,
					'mark'		=> $marked,
					'i'			=> $id,
					'mode'		=> $mode,
					'action'	=> $action))
				);
			}
so why would this result in a module not found error?
xenador
Registered User
Posts: 89
Joined: Wed Nov 22, 2006 1:27 am

Re: acp logs setup

Post by xenador »

ah ok never mind I figured it out. For other people if you run across this problem. do a viewsource on the page where you click "yes" or "no" and scroll down until you see the hidden array. for me in particular the 'i' => $id needed to be changed to 'i' => 'k_modules' and then everything worked fine and dandy.
Locked

Return to “[3.0.x] MOD Writers Discussion”