News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

PageEar (Page peel)

Started by KiLLuMiNaTi-7-, August 07, 2008, 07:51:33 AM

Previous topic - Next topic

KiLLuMiNaTi-7-

Quote from: dkharp on December 18, 2009, 02:52:45 PM
Hello,

I am getting a new error. When I go into admin settings to adjust.  I get this now.

QuoteFatal error: Call to undefined function ModifyPageEarModSettings() in /home/content/j/o/h/johnnyskid/html/Sources/ManageSettings.php on line 227

Can anyone help?

Somehow the ModifyPageEarModSettings() function disappeared  :s

Try replacing the file with this one.

dkharp

I just got done looking at it. The part u add to the bottom before the > was gone. Thanks you for your response.

Xarcell

Very nice mod, but I'm having some issues.

I installed on SMF 2.0 RC2. I get this error in my error log (also confirmed on a fresh install of SMF 2.0 RC2):

Quote8: Undefined index: pageear_settings_descFile: /home/xxx/xxx.com/Sources/ManageSettings.php
Line: 211 

Here is the code around that area:

// Load up all the tabs...
$context[$context['admin_menu_name']]['tab_data'] = array(
'title' => $txt['admin_modifications'],
'help' => 'modsettings',
'description' => $txt['modification_settings_desc'],
'tabs' => array(
'general' => array(
),
'pageear' => array(
'label' => $txt['pageear_settings_title'],
'description' => $txt['pageear_settings_desc'],
),
'chat' => array(
'label' => $txt['chat'],
'description' => $txt['chat_settings_desc'],
),
'rssfeeds' => array(
'description' => $txt['rss_feeder_desc'],
),
),
); 


The other this is it works on the default theme, but not the custom theme I made. No errors, no parse errors, nothing. I followed the instructions for SMF 2.0. Here is my index.template.php code:

<?php
// Version: 2.0 RC2; 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 version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '2.0 RC2';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as opposed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status separate from topic icons? */
$settings['separate_sticky_lock'] = true;

/* Does this theme use the strict doctype? */
$settings['strict_doctype'] = false;

/* Does this theme use post previews on the message index? */
$settings['message_index_preview'] = false;

/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
$settings['require_theme_strings'] = false;
}

// The main sub template above the content.
function template_html_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 xmlns="http://www.w3.org/1999/xhtml"'
$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_html_safe'], '" />
<meta name="keywords" content="'
$context['meta_keywords'], '" />
<title>'
$context['page_title_html_safe'], '</title>';

// Please don't index these Mr Robot.
if (!empty($context['robot_no_index']))
echo '
<meta name="robots" content="noindex" />'
;

// Present a canonical url for search engines to prevent duplicate content in their indices.
if (!empty($context['canonical_url']))
echo '
<link rel="canonical" href="'
$context['canonical_url'], '" />';

// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/css/index'$context['theme_variant'], '.css?rc2" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/print.css?rc2" media="print" />';

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

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name_html_safe'], ' - '$txt['rss'], '" href="'$scripturl'?type=rss;action=.xml" />';

// 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'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?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'?board='$context['current_board'], '.0" />';

// Some browsers need an extra stylesheet due to bugs/compatibility issues.
foreach (array('ie7''ie6''firefox''webkit') as $cssfix)
if ($context['browser']['is_' $cssfix])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/'$cssfix'.css" />';

// The ?rc1 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style'$context['theme_variant'], '.css?rc1" />';

// RTL languages require an additional stylesheet.
if ($context['right_to_left'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/css/rtl.css" />';

echo '
<script type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/script.js?rc2"></script>
<script type="text/javascript" src="'
$settings['theme_url'], '/scripts/theme.js?rc2"></script>
    <script language="JavaScript" type="text/javascript" src="'
$settings['theme_url'], '/scripts/mootools.js"></script>
    <script language="JavaScript" type="text/javascript" src="'
$settings['theme_url'], '/scripts/menu.js"></script>
    <script language="JavaScript" type="text/javascript" src="'
$settings['theme_url'], '/scripts/main.js"></script>
<script type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_default_theme_url = "'
$settings['default_theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";'$context['show_pm_popup'] ? '
var fPmPopup = function ()
{
if (confirm("' 
$txt['show_personal_messages'] . '"))
window.open(smf_prepareScriptUrl(smf_scripturl) + "action=pm");
}
addLoadEvent(fPmPopup);' 
'''
var ajax_notification_text = "'
$txt['ajax_in_progress'], '";
var ajax_notification_cancel_text = "'
$txt['modify_cancel'], '";
// ]]></script>'
;

// Output any remaining HTML headers. (from mods, maybe?)

if(
$modSettings['pageear_enable'])
echo 
'
<script type="text/javascript" src="'
$settings['default_theme_url'],' /scripts/pageear/AC_OETags.js"></script>
<script type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/pageear/pageear.js"></script>
<script type="text/javascript">
var pagearSmallImg = "'
$modSettings['pageear_surl'], '"; 
var pagearSmallSwf = "'
$settings['default_theme_url'], '/scripts/pageear/pageear_s.swf"; 
var pagearBigImg = "'
$modSettings['pageear_burl'], '"; 
var pagearBigSwf = "'
$settings['default_theme_url'], '/scripts/pageear/pageear_b.swf";
var speedSmall = "3";
var mirror = "'
, (empty($modSettings['pageear_mirror_effect']) ? 'false' 'true'), '";
var pageearColor = "ffffff";
var jumpTo = "'
$modSettings['pageear_jump_to'], '" 
var openLink = "'
$modSettings['pageear_open_new'], '";
var openOnLoad = "'
, (empty($modSettings['pageear_on_load']) ? 'false' $modSettings['pageear_on_load']), '";
var closeOnLoad = "'
$modSettings['pageear_close_onload'], '"; 
var setDirection = "'
, (empty($modSettings['pageear_lt']) ? 'rt' 'lt' ), '"; 
var softFadeIn = "'
$modSettings['pageear_soft_fade'], '"; 
var requiredMajorVersion = "6";
var requiredMinorVersion = "0";
var requiredRevision = "0";
var copyright = "Webpicasso Media, www.webpicasso.de"; 
var thumbWidth  = "100";
var thumbHeight = "100";
var bigWidth  = "500";
var bigHeight = "500";
var xPos = "right";
var queryParams = "pagearSmallImg="+escape(pagearSmallImg); 
queryParams += "&pagearBigImg="+escape(pagearBigImg); 
queryParams += "&pageearColor="+pageearColor; 
queryParams += "&jumpTo="+escape(jumpTo); 
queryParams += "&openLink="+escape(openLink); 
queryParams += "&mirror="+escape(mirror); 
queryParams += "&copyright="+escape(copyright); 
queryParams += "&speedSmall="+escape(speedSmall); 
queryParams += "&openOnLoad="+escape(openOnLoad); 
queryParams += "&closeOnLoad="+escape(closeOnLoad); 
queryParams += "&setDirection="+escape(setDirection); 
queryParams += "&softFadeIn="+escape(softFadeIn);</script>'
;

echo $context['html_headers'];

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

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


echo 
'
<img class="btitle" src="'
$settings['images_url'], '/theme/header-left.png" alt="" />
<div class="bheaderbg"><img class="bheader-right" src="'
$settings['images_url'], '/theme/header-right.jpg" alt="" /></div>
<div class="bmargin">'
;

echo !empty($settings['forum_width']) ? '
<div id="wrapper" style="width: ' 
$settings['forum_width'] . '">' '''

<div id="indexmenubg"><div class="frame">'
;

// Show the menu here, according to the menu sub template.
template_menu();

echo '
<br class="clear" /><br class="clear" />'
;

// Show the navigation tree.
theme_linktree();

echo '
</div>
</div>'
;


// The main content should go here.
echo '
<div id="content_section"><div class="frame">
<div id="main_content_section">'
;
}

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

echo '
  <br /></div>
</div>
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div id="footer_section">
    <div class="frame">'
theme_copyright(), '| Design By: <a href="http://xarthemes.com" target="_blank">Xarcell</a>';

// Show the load time?
if ($context['show_load_time'])
echo '
<p>'
$txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</p>';

  echo '
    </div>
 </div>
</div>'
;
}

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

echo 
'
'
, ($modSettings['pageear_enable'] ? '<script type="text/javascript">  
 writeObjects();
</script>' 
'') , '</body></html>';
}

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

// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;

// Reverse the linktree in right to left mode.
if ($context['right_to_left'])
$context['linktree'] = array_reverse($context['linktree'], true);

echo '
<div class="navigate_section">
<ul>'
;

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
echo '
<li'
, ($link_num == count($context['linktree']) - 1) ? ' class="last"' '''>';

// Don't show a separator for the last one (RTL mode)
if ($link_num != count($context['linktree']) - && $context['right_to_left'])
echo '«&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 $settings['linktree_link'] && isset($tree['url']) ? '
<a href="' 
$tree['url'] . '"><span>' $tree['name'] . '</span></a>' '<span>' $tree['name'] .'</span>';

// 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']) - && !$context['right_to_left'])
echo '&nbsp;»';

echo '
</li>'
;
}
echo '
</ul>
</div>'
;

$shown_linktree true;
}

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

echo '
<div id="fancymenu">
<ul>'
;

foreach ($context['menu_buttons'] as $act => $button)
{
echo '
<li class="'
$button['active_button'] == $act 'current' '' '"><a title="'$act'" href="'$button['href'], '"><span>'$button['title'], '</span></a></li>';
}
echo '
</ul>
</div>'
;
}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$strip_options = array())
{
global $settings$context$txt$scripturl;

if (!is_array($strip_options))
$strip_options = array();

// Create the buttons...
$buttons = array();
foreach ($button_strip as $key => $value)
{
if (!isset($value['test']) || !empty($context[$value['test']]))
$buttons[] = '<a ' . (isset($value['active']) ? 'class="active" ' '') . 'href="' $value['url'] . '" ' . (isset($value['custom']) ? $value['custom'] : '') . '><span>' $txt[$value['text']] . '</span></a>';
}

// No buttons? No button strip either.
if (empty($buttons))
return;

// Make the last one, as easy as possible.
$buttons[count($buttons) - 1] = str_replace('<span>''<span class="last">'$buttons[count($buttons) - 1]);

echo '
<div class="buttonlist'
, !empty($direction) ? ' align_' $direction '''"', (empty($buttons) ? ' style="display: none;"' ''), (!empty($strip_options['id']) ? ' id="' $strip_options['id'] . '"'''), '>
<ul>
<li>'
implode('</li><li>'$buttons), '</li>
</ul>
</div>'
;
}

?>


I'm using mootools for the main menu, could that be interfering with it?

KiLLuMiNaTi-7-

Thanks for reporting that Xarcell. I've updated the package on the mod site.

Heres the fix if you dont want to install it again:

In Sources/ManageSettings.php

Find:

'pageear' => array(
'label' => $txt['pageear_settings_title'],
'description' => $txt['pageear_settings_desc'],
),


Replace:

'pageear' => array(
'label' => $txt['pageear_settings_title'],
),

Xarcell

Quote from: KiLLuMiNaTi-7- on December 28, 2009, 08:25:57 AM
Thanks for reporting that Xarcell. I've updated the package on the mod site.

Heres the fix if you dont want to install it again:

In Sources/ManageSettings.php

Find:

'pageear' => array(
'label' => $txt['pageear_settings_title'],
'description' => $txt['pageear_settings_desc'],
),


Replace:

'pageear' => array(
'label' => $txt['pageear_settings_title'],
),


I made the changes posted, but still same problem.

KiLLuMiNaTi-7-

Strange as it works without no errors for me on a fresh install.

Try cleaning your cache on your forum. If errors are still being added in your error log attach your ManageSettings.php file here and i'll take a look.

Xarcell

Quote from: KiLLuMiNaTi-7- on December 28, 2009, 06:07:57 PM
Strange as it works without no errors for me on a fresh install.

Try cleaning your cache on your forum. If errors are still being added in your error log attach your ManageSettings.php file here and i'll take a look.

I cleaned the cache and still nothing. No errors, or page peel. Works fine on default theme, but not custom. I have added the code to the theme for the proper version, but it still doesn't work.

http://inspireromance.com/index.php?theme=1 default
http://inspireromance.com/index.php?theme=3 custom theme

Xarcell

I tried removing the mootools menu, but it still didn't work. I'm triple checking everything, but I still cannot figure out why it isn't working on the custom theme.

KiLLuMiNaTi-7-

I thought your issue was just the error in the error log. Sorry :-[.

Just looked at my edits i've posted up and there seems to be an extra space on one of the lines.

This line:
<script type="text/javascript" src="', $settings['default_theme_url'],'/scripts/pageear/AC_OETags.js"></script>

Find the line that looks like the one above and replace it with it ;)

KensonPlays

Hello, installed your mod. It installs successfully for all themes, but I have a image hosted on picasaweb.google.com, and it won't show, just a white square small and large! I have  a small image, and a large one, and nothing works! (will check within a hour...)

EDIT:
I also have a copy of each image on my website, and I type in full URL (http://other.kcmartz.com/images/twt_sm.png and /images/twt_lg.png) and it won't show!

KiLLuMiNaTi-7-

Quote from: Kcmartz on January 04, 2010, 01:56:00 PM
Hello, installed your mod. It installs successfully for all themes, but I have a image hosted on picasaweb.google.com, and it won't show, just a white square small and large! I have  a small image, and a large one, and nothing works! (will check within a hour...)

EDIT:
I also have a copy of each image on my website, and I type in full URL (http://other.kcmartz.com/images/twt_sm.png and /images/twt_lg.png) and it won't show!

JPG's only atm im afraid :(

Bob Perry of Web Presence Consulting

Just installed on my SMF 2.0 RC2 site, works flawlessly so far... great work.
Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

Xarcell

I thought I'd come back and give this mod another try since I couldn't get it to work on custom themes.

I got it to work this time. Very nice mod, thanks.

rngrdanny22

Great looking mod!

Any chance for an upgrade to 2.0RC3?

Thanks!

Bob Perry of Web Presence Consulting

Quote from: rngrdanny22 on April 11, 2010, 11:40:56 AM
Great looking mod!

Any chance for an upgrade to 2.0RC3?

Thanks!

Works just fine on my SMF 2.0 RC3 system however I don't remember if I had to do anything extra to get it working on this version.
Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

nashamiki

Hello, I run a residents community forum at hxxp:ecovoice.net/forum [nonactive] with SMF 1.1.7.

I've installed and activated PageEar through the "packages" section in admin and done all the settings there but it just does not show up.

Any help on this please?

Thanks...Mokhsein

Casa Grande

love the mod, works great....is there a way to preload the images so there's no lag time when loading the larger image?

Erron

Great mod, love it, strange thing just started happening for me though, only people who are NOT logged in can see it, logged in forum members cant see it anymore (unless they log out).

any ideas?

Jessica.

this looks like an interesting mod :P *tries out*
Testing Zone - SMF 2.0.7, default Curve
School & Chat - phpBB3, over 170 mods installed, official live forum

I use the latest version of Chrome

phpBB: Forum = a section; Board = whole site
SMF: Forum = whole site; Board = a section

KiLLuMiNaTi-7-

Quote from: Erron on June 28, 2011, 08:33:37 AM
Great mod, love it, strange thing just started happening for me though, only people who are NOT logged in can see it, logged in forum members cant see it anymore (unless they log out).

any ideas?

This mod has some compatibly problems with other javascript scripts. Do you have any other javascript mods or any other mods that only show when your logged in?

Advertisement: