Jump to content


- - - - -

(IM) Toggle Visibility v1.0.2


  • Please log in to reply
29 replies to this topic

#21 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 10 September 2010 - 10:51 AM

You can change the entire content of skin_global -> toggleVisibility to this:
<script type="text/javascript">
document.observe( 'dom:loaded', function()
{
	$( 'toggleVisibility' ).observe( 'click', toggleVisibility );
});
function toggleVisibility(e)
{
	Event.stop(e);
	new Ajax.Request( ipb.vars['base_url'] + '&app=core&module=ajax&section=toggleVisibility',
	{
		parameters:
		{
			'md5check': ipb.vars['secure_hash']
		},
		evalJSON: 'force',
		onSuccess: function(t)
		{
			if( Object.isUndefined( t.responseJSON ) )
			{
				alert( "Bad Request" );
			}
			else if ( t.responseJSON['error'] )
			{
				alert( "Something unexpected happened" );
			}
			else
			{
				alert( t.responseJSON['msg'] );
				$( 'toggleVisibility' ).writeAttribute( "title", t.responseJSON['link_title'] );
				$( 'currentStatus' ).update( t.responseJSON['link_title'] );
			   }
		   }
	});
}
</script>
<li>
	<strong>
		<a id="toggleVisibility" href="{parse url="app=core&amp;module=global&amp;section=toggleVisibility" base="public"}" title='{$this->lang->words['current_status']}: {$status}'>{$this->lang->words['toggle_visibility']} (<span id="currentStatus">{$this->lang->words['current_status']}: {$status}</span>)</a>
	</strong>
</li>

Not tested it, but should change the link to "Toggle Visibility (Current Status: Visible)".

#22 DyCe

DyCe

    Coder

  • Banned
  • PipPipPipPipPip
  • 126 posts
  • Real Name:DyCe
  • IPB Version:v2.3.x

Posted 10 September 2010 - 11:21 AM

There is a syntax error in the template. won't saved.

#23 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 10 September 2010 - 01:20 PM

View PostDyCe, on 10 September 2010 - 11:21 AM, said:

There is a syntax error in the template. won't saved.
Updated the previous post with a working code. Tested it this time.

#24 DyCe

DyCe

    Coder

  • Banned
  • PipPipPipPipPip
  • 126 posts
  • Real Name:DyCe
  • IPB Version:v2.3.x

Posted 11 September 2010 - 12:19 PM

thanks you working fine.

#25 sosna

sosna

    Novice

  • Members
  • PipPip
  • 7 posts
  • IPB Version:N/A

Posted 24 April 2011 - 01:17 PM

After installing and uninstalling this modification i have cool error when i go to any topic :/

Fatal error: Call to undefined method tbShowRepInTopicView::banMember() in /home/dtraders/public_html/www.warez-x.pl/cache/skin_cache/cacheid_1/skin_global.php on line 1226

line 1226 is "
. $this->registry->getClass('output')->getTemplate('global')->banMember($author['member_id'], $author['g_access_cp'], array()) . "";
return $IPBHTML;

I dont know it was before installing or after uninstalling

I need really fast support, my forum is offline becouse of that ;/

Edited by sosna, 24 April 2011 - 01:28 PM.


#26 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 24 April 2011 - 01:46 PM

Has nothing to do with this. Probably related to some sort of hook that lets you easily ban members, or to show reputation in topic view. Try a skin recache first.

#27 sosna

sosna

    Novice

  • Members
  • PipPip
  • 7 posts
  • IPB Version:N/A

Posted 24 April 2011 - 01:53 PM

If by Look & Feel - template tools I done it and nothing... ;/ I think it may be becouse of ban system by calypso which was uninstalled few days ago...What i can do? =(

#28 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 24 April 2011 - 02:00 PM

If that application came with a hook, make sure it's not present in "Manage Hooks". If it is, uninstall it.

#29 sosna

sosna

    Novice

  • Members
  • PipPip
  • 7 posts
  • IPB Version:N/A

Posted 24 April 2011 - 02:02 PM

Problem solved by installing modification "ban"

Edited by sosna, 24 April 2011 - 04:30 PM.


#30 Yurrio

Yurrio

    n00b

  • Members
  • Pip
  • 1 posts
  • Real Name:Yuri
  • IPB Version:v3.0.x

Posted 09 August 2011 - 06:51 PM

Hello.
It will be updated for 3.2?
Thanks for perfect app.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users