Coinbase

The package you are trying to download or install is either corrupt or...

Started by bliss, June 24, 2006, 02:04:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bliss

Error when trying to install package (ad_mod_rc2_v2.zip):
QuoteThe package you are trying to download or install is either corrupt or not compatible with this version of SMF.

I'm running:
SMF 1.0.7 RC 2
MySQL 5.0.18
Sim Blue theme

Manually running install.php shows this error:
QuoteFatal error: Call to undefined function: db_query() in /home/.flabby/townsendw3g/forum.novelist-forums.org/Packages/temp/install.php on line 3

Everything I've tried so far has been undone. The steps I've taken:

Deleting everything but:
<?php

?>

... from index.php, and manually running the query through phpMyAdmin. (Replacing the prefix variable with the actual prefix.) Afterward, attempting to install again (index.php was empty, so I wouldn't get any error message from trying to go the route I did before), resulted in the same Package Manager error.

I've also attempted to edit the files in my template directory and doing things that way. Fearing that I'd majorly screw something up (like forgetting to back up a file, I do that sometimes), I restored everything to the way it was and dropped the 'ads' table from the DB.

Any suggestions?

jerm


bliss

Thanks for the quick reply. :)

Version Information:
Forum version: SMF 1.0.7

View and Remove Installed Packages
      Mod Name                               Version
1.    MySQL 5.0.12 Compatibility Update   1.0    [ Uninstall ]
2.    SMF 1.0.7 / 1.1 RC2 Update             1.0    [ Uninstall ]

jerm

you will need to install this version of the Ad Management mod:
ad_mod_1-0-7_v1-0-2b.zip

Its not the most up to date version, and doesn't include all of the features but its the latest version that works with 1.0.7

erik

Erik?
   SMF Ads "translator"

bliss

I do appreciate the help. It's really good to see that you support your work this well. :)

jerm

Quote from: erik on June 24, 2006, 02:53:07 AM
@electrohome:

why not make a v2.0 for 1.0.7 too?
i put a lot of work into v2.0 to work with rc2. im not sure how much added work i'd have to do to make it work with 1.0.7

bliss

Okay, now I'm getting this error when I try to view any page:

Fatal error: Call to undefined function show_topofpageAds() in /home/*snip*/Sources/Load.php(1040) : eval()'d code on line 108

It's only after I modify the index.template.php.

<?php
// Version: 1.0; index

/* This template is, perhaps, the most important template in the theme.  It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below.  It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';
}

// The main sub template above the content.
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js"></script>
<script language="JavaScript" type="text/javascript"><!--
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
// --></script>
<title>'
$context['page_title'], '</title>';

// This is here because Gecko browsers properly support white-space....
if ($context['browser']['is_gecko'])
echo '
<style type="text/css"><!--
.code
{
white-space: pre;
}
--></style>'
;

echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css" />';

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" target="_blank" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="' 
$scripturl '?action=;topic=' $context['current_topic'] . '.0;prev_next=prev" />
<link rel="next" href="' 
$scripturl '?action=;topic=' $context['current_topic'] . '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' 
$scripturl '?action=;board=' $context['current_board'] . '.0" />';

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
</head>
<body>'
;
////Ad Management////
//Display ads on the top of the page
$ads show_topofpageAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
////Ad Management////

// Because of the way width/padding are calculated, we have to tell Internet Explorer 4 and 5 that the content should be 100% wide. (or else it will assume about 108%!)
echo '
<div style="background-color: #123456; border-bottom: 1px solid gray; padding: 12px 30px 0px 30px;'
$context['browser']['needs_size_fix'] ? ' width: 100%;' '''">';



// The logo and the user info.
echo '
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td width="50%"><font size="4">'
$context['forum_name'], '</font></td>
    <td width="50%">

    <div class="smalltext" style="margin: 5px; font-family: verdana, arial, sans-serif;'
, !empty($context['user']['avatar']) ? ' background-image: url(' $context['user']['avatar']['href'] . '); background-position: top right; background-repeat: no-repeat;' '''">';

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
'
$txt['hello_member'], ' <b>'$context['user']['name'], '</b>';

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ', '$txt[152], ' <a href="'$scripturl'?action=pm">'$context['user']['messages'], ' '$context['user']['messages'] != $txt[153] : $txt[471], '</a>'$txt['newmessages4'], ' '$context['user']['unread_messages'], ' '$context['user']['unread_messages'] == $txt['newmessages0'] : $txt['newmessages1'];
echo '.';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<br />
<b>'
$txt[616], '</b>';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<br />
'
$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'?action=regcenter">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'];

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
<br />'
$txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'];
}

echo '<br />
<a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a><br />
<a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />
'
$context['current_time'];
}
// Otherwise they're a guest - so politely ask them to register or login.
else
{
echo '
'
$txt['welcome_guest'], '<br />
'
$context['current_time'], '<br />

<form action="'
$scripturl'?action=login2" method="post" style="margin: 3px 1ex 1px 0; text-align:right;">
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">'
$txt['smf53'], '</option>
<option value="1440">'
$txt['smf47'], '</option>
<option value="10080">'
$txt['smf48'], '</option>
<option value="302400">'
$txt['smf49'], '</option>
<option value="-1" selected="selected">'
$txt['smf50'], '</option>
</select>
<input type="submit" value="'
$txt[34], '" /><br />
'
$txt['smf52'], '
</form>'
;
}
echo 
'
    </div>
</td>
</tr>
</table>'
;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo 
'
<div style="height: 5px"></div>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
      <td width="100%">'
$context['random_news_line'], '
    </td>
  </tr>
</table>'
;

// Show the menu here, according to the menu sub template.
echo '
<div align="right"><table border="0" cellpadding="0" cellspacing="0" width="80%">
  <tr>
        <td width="100%" align="right" valign="bottom">'
;
//Below the menu ads
$ads show_indexAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);

//Tower left Ads
$ads show_towerleftAds();
if(!empty($ads))
echo '<table><tr><td valign="top">'$ads['type']==$ads['content'] : eval($ads['content']) ,'</td><td width="100%" valign="top">';

unset($ads);
//Tower Right Ads
$ads show_towerrightAds();
if(!empty($ads))
echo '<table><tr><td width="100%" valign="top">';
unset($ads);
template_menu();
echo 
'
    </td>
    </tr>
</table></div></div>'
;


// The main content should go here.  A table is used because IE 6 just can't handle a div.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
<td style="background-color: #123456; padding: 1ex 20px 2ex 20px;">'
;
}

function 
template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '</td>
</tr></table>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright.  Remember, the copyright must be somewhere!
//Close table for towerright ads
$ads show_towerrightAds();
if(!empty($ads))
echo '</td><td valign="top">'$ads['type']==$ads['content'] : eval($ads['content']) ,'</td></tr></table>';

unset($ads);
//Close table for towerleft ads
$ads show_towerleftAds();
if(!empty($ads))
echo '</td></tr></table>';
unset($ads);

//Show ads on the bottom of the page
$ads show_bottomAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
echo '

<div style="background-color: #123456; border-top: 1px solid gray; text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
<script language="JavaScript" type="text/javascript"><!--
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// --></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td valign="middle" align="center" style="white-space: nowrap;">
'
theme_copyright(), '
</td>
</tr>
</table>'
;

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

echo '
</div>'
;

// This is an interesting bug in Internet Explorer AND Safari.  Rather annoying, it makes overflows just not tall enough.
if ($context['browser']['is_ie'] && !$context['browser']['is_ie4'] || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!--'
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
else
{
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
window_oldOnload();
}'
;
}

echo '
// --></script>'
;
}

echo '
</body>
</html>'
;
}

// Show a linktree.  This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context$settings$options;

// Folder style or inline?  Inline has a smaller font.
echo '<span class="nav"'$settings['linktree_inline'] ? ' style="font-size: smaller;"' '''>';

// Each tree item has a URL and name.  Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show the | | |-[] Folders.
if (!$settings['linktree_inline'])
{
if ($link_num 0)
echo str_repeat('<img src="' $settings['images_url'] . '/icons/linktree_main.gif" alt="| " border="0" />'$link_num 1), '<img src="' $settings['images_url'] . '/icons/linktree_side.gif" alt="|-" border="0" />';
echo '<img src="' $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp; ';
}

// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo $settings['linktree_inline'] ? ' &nbsp;|&nbsp; ' '<br />';
}

echo '</span>';
}

// Show the menu up top.  Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

// Show the [home] and [help] buttons.
echo '
<a href="'
$scripturl'">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/home.gif" alt="' $txt[103] . '"  border="0" />' $txt[103]), '</a>'$context['menu_separator'], '
<a href="'
$scripturl'?action=help" target="_blank">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/help.gif" alt="' $txt[119] . '"  border="0" />' $txt[119]), '</a>'$context['menu_separator'];

// How about the [search] button?
if ($context['allow_search'])
echo '
<a href="'
$scripturl'?action=search">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/search.gif" alt="' $txt[182] . '"  border="0" />' $txt[182]), '</a>'$context['menu_separator'];

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<a href="'
$scripturl'?action=admin">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/admin.gif" alt="' $txt[2] . '"  border="0" />' $txt[2]), '</a>'$context['menu_separator'];

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<a href="'
$scripturl'?action=profile">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/profile.gif" alt="' $txt[79] . '" border="0" />' $txt[467]), '</a>'$context['menu_separator'];

// The [calendar]!
if ($context['allow_calendar'])
echo '
<a href="'
$scripturl'?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/calendar.gif" alt="' $txt['calendar24'] . '" border="0" />' $txt['calendar24']), '</a>'$context['menu_separator'];

// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<a href="'
$scripturl'?action=login">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/login.gif" alt="' $txt[34] . '" border="0" />' $txt[34]), '</a>'$context['menu_separator'], '
<a href="'
$scripturl'?action=register">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/register.gif" alt="' $txt[97] . '" border="0" />' $txt[97]), '</a>';
}
// Otherwise, they might want to [logout]...
else
echo '
<a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' $settings['images_url'] . '/' $context['user']['language'] . '/logout.gif" alt="' $txt[108] . '"  border="0" />' $txt[108]), '</a>';
}

?>



EDIT 2 - The other files were not in my current theme's directory. The install report stated that the ones in the default theme's directory were modified. I'm *assuming* that my current theme inherits a lot from the default.

EDIT 3 - Also, I think this applies to me:
Quote from: erik on June 24, 2006, 02:46:02 AM
Quote from: electrohome on June 23, 2006, 07:08:50 PM
search for this instead:
</td>
only one line will show up

It's inside the userbox at the top. Some themes doesn't have it

jerm

upload LoadAds.php to your sources directory.
and make sure the edits to index.php are done

bliss

When I install ad_mod_1-0-7_v1-0-2b.zip, no changes are made to index.php. I tried doing a copy & paste from the install.xml in the ad_mod_rc2_v2.zip package, but that didn't work. I tried using the whole install.xml from ad_mod_rc2_v2.zip, but that didn't work either.

I tried finding a few of the things from the ad_mod_1-0-7_v1-0-2b.zip install.xml in my index.php, but was unable to do so. (I have only but a warm fuzzy with XML and PHP, but obviously not good enough to figure out what the hell I'm doing. lol!)

So, what should I do now? Go to RC2? Would that be an upgrade or downgrade?

bigguy

What type of editor are you using to do the edits. ??? Notepad sometimes leaves spaces were there not supposed to be, dreamweaver to so I hear. try this editor:

http://www.mpsoftware.dk/phpdesigner.php

bliss

I'm using TextPad, it's an IDE geared toward Java, but it does highlights and such for other languages... like PHP.

bigguy

How are you uploading the file after you edit it ??? through ftp ??? or cpanel. Sometimes ftp has a tendency to screw with files a bit to. There is no reason why the edits should not have worked.

bliss

My host doesn't use cPanel.

My choices are either an FTP client or their web-based FTP.

Also, keep in mind:
QuoteI tried finding a few of the things from the ad_mod_1-0-7_v1-0-2b.zip install.xml in my index.php, but was unable to do so. (I have only but a warm fuzzy with XML and PHP, but obviously not good enough to figure out what the hell I'm doing. lol!)

tkapet

hello there :)
i am getting the same error during the installation of ad_mod_rc2_v2.zip:
"in the default themeThe package you are trying to download or install is either corrupt or not compatible with this version of SMF."


and i am using SMF 1.1 RC2 - CVS 20060213.

i also use the default theme: "Smf Default Theme-Core".



jerm


tkapet

i dont know what is a CVS version mean.
maybe a not stable version?

jerm

Are you the owner of your site?
Can i have a link to your site please.

tkapet

thank very much for your suport jerm.
i am the owner but i currently developing in localhost.If there any way you can see the site of course i will give you the admin permission to take a look at it.

jerm

If you could respond to the pm i sent you, we could work on getting the ad mod installed on your forum.

tkapet

i can answer to your question but i dont have the permissions to sent you a pm in this forum.
when i click New message displays: "An error occured......"

jerm


plinkous

i am trying to install this mod ad_mod_rc2_v1-5

but everytime i try to install it i get a error that says package is bad

have uploaded it to my site and extracted it but still no luck

can't figure out how to run the install.php file so not sure what i can do

any help would be great .....

thank you in advance