FIXED - r398: No frontend edit button

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
User avatar
antonumia
Posts: 77
Joined: Mon 14. Feb 2005, 16:10
Contact:

FIXED - r398: No frontend edit button

Post by antonumia »

hi all,
I can't seem to get my frontend edit button to appear
I've set it in the config.

btw: I'm using jquery if it makes any difference.


puzzled,

anton
Last edited by antonumia on Wed 12. May 2010, 12:56, edited 1 time in total.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: r398: No frontend edit button

Post by flip-flop »

Hi,

there is no different for me. Running well with MooTools or jQuery in v1.4.5 r400.

- Is this snippet available for you: template/lib/jquery/plugin/jquery.switchClass.js
- is this snippet loaded in the frontend with activated FE-edit?

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
antonumia
Posts: 77
Joined: Mon 14. Feb 2005, 16:10
Contact:

Re: r398: No frontend edit button

Post by antonumia »

hi,

yes the snippet is there but isn't loaded in the FE.
I've added it into my template just to check - nothing...
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: r398: No frontend edit button

Post by flip-flop »

config:

Code: Select all

$phpwcms['SESSION_FEinit']    = 1;
$phpwcms['frontend_edit']     = 1;
Source FE jQuery:

Code: Select all

  <script type="text/javascript" src="template/lib/jquery/jquery-1.4.min.js"></script>
  <link href="template/inc_css/specific/frontend_edit.css" rel="stylesheet" type="text/css" />
  <script type="text/javascript">
  <!-- 
	jQuery(document).ready(function() {
		$("a.fe-link").toggle();$("#fe-link").click(function(){$(this).switchClass("enabled","disabled");$("a.fe-link").toggle();});
	});
  //-->
  </script>
Source FE MooTools:

Code: Select all

 <script type="text/javascript" src="template/lib/mootools/mootools-1.2-core-yc.js"></script>
  <link href="template/inc_css/specific/frontend_edit.css" rel="stylesheet" type="text/css" />
  <script type="text/javascript">
  <!-- 
	window.addEvent("domready", function() {
		var felink_status = 0;
		$$("a.fe-link").each(function(r) { r.setStyle("display", "none"); });
		$("fe-link").addEvent("click", function() {
			if(felink_status == 1) {
				$$("a.fe-link").each(function(r) { r.setStyle("display", "none"); });
				$("fe-link").removeClass("enabled"); $("fe-link").addClass("disabled");	felink_status = 0;
			} else {
				$$("a.fe-link").each(function(r) { r.setStyle("display", ""); });
				$("fe-link").removeClass("disabled"); $("fe-link").addClass("enabled");	felink_status = 1;
			}
		});
	});
  //-->
  </script>
But the best of all, we don´t need JS for FE-Edit !!!

Please don´t put any snippets into a template for FE-Edit!!!

I think your installation is not quite i.o.

Knut
Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
antonumia
Posts: 77
Joined: Mon 14. Feb 2005, 16:10
Contact:

Re: r398: No frontend edit button

Post by antonumia »

hi Knut,
thanks.
That breaks all my other jquery stuff
I suspect you are right about the installation. Was an upgrade from 1.4.2
I will do a directory compare to see what happened.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: r398: No frontend edit button

Post by flip-flop »

In mind:

since r381 it can be problematic to run a JS lib using this call:

Code: Select all

$GLOBALS['block']['custom_htmlhead']['jquery-XX'] = '  <script src="'.TEMPLATE_PATH.'inc_js/jquery/jquery-XX.js" type="text/javascript"></script>';

The new one e.g.:

Code: Select all

initJSPlugin('jquery-XX');

with a file in
/template/lib/jquery/plugin/jquery.jquery-XX.js

The main lib is automatically loaded if you run a initJSPlugin (If you have switched the right main-lib in template)!!

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: r398: No frontend edit button

Post by Oliver Georgi »

Check your template and enable the correct JS library. Be aware when using a jQuery extension that is not compatible with 1.4.x
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
phalancs
Posts: 793
Joined: Thu 19. Feb 2004, 05:09
Location: Germany

Re: r398: No frontend edit button

Post by phalancs »

The FE-setting:

$phpwcms['frontend_edit'] = 1;

should have the hint included in the comment that it needs the "FEsessions" activated!!!

$phpwcms['frontend_edit'] = 1; // blabla activate FEsessions in this config file
2008
User avatar
antonumia
Posts: 77
Joined: Mon 14. Feb 2005, 16:10
Contact:

Re: r398: No frontend edit button - FIXED

Post by antonumia »

The problem is that I put all my js includes in the html head section of my templates.
jquery is loaded after the html head additions = $ is undefined
Post Reply