Welcome, Guest. Please login or register.
Did you miss your activation email?
May 16, 2012, 10:14:50 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155094 Posts in 21661 Topics by 7721 Members
Latest Member: arrow345
* Home Help Search Login Register
Pages: [1] 2   Go Down
Print
Author Topic: Edit this page as code snippet module  (Read 8054 times)
RolfP

Offline Offline

Posts: 18


« on: December 23, 2007, 12:06:27 PM »

Hi,

I modified the code posted at http://forum.websitebaker.org/index.php/topic,2352.0.html and created a module.
This module adds an image in template where ever you put the code
<?php frontend_edit(); ?> if the logged in account is allowed to edit the page.

On clicking image the backend editor opens the selected page.

See the attached modul.

Have fun.

Rolf
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7970



WWW
« Reply #1 on: December 23, 2007, 12:30:00 PM »

Hello,

well done, easy to install, very easy to handle. Great snippet.

Thanks for your contribution to WB.

Matthias
Logged
berta

Offline Offline

Posts: 11



WWW
« Reply #2 on: January 04, 2008, 08:30:39 AM »

Rolf,
Thank you for your module, it works great, and makes it so much easier to ask other people to edit the pages. THANKS
Berta
Logged

Berta
diodak

Offline Offline

Posts: 85


« Reply #3 on: January 22, 2008, 12:33:15 PM »

You didnt notice that front login must be enabled. Good module.
Logged

Buchsbaum
JonH

Offline Offline

Posts: 25


« Reply #4 on: January 25, 2008, 01:44:07 PM »

Where's the attachment?
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7970



WWW
« Reply #5 on: January 25, 2008, 01:50:24 PM »

in the first post  grin
Logged
JonH

Offline Offline

Posts: 25


« Reply #6 on: January 25, 2008, 03:16:48 PM »

I swear it wasn't there before!  grin
Logged
fsuk

Offline Offline

Posts: 127



« Reply #7 on: July 18, 2008, 03:32:48 PM »

Needs to be updated for 2.7, only works with the default group_id and not the group_ids field. i might give it ago if i have time, that is of couse unless theres a feature like this already built into 2.7??
Logged

You say deviant like its a bad thing...
fsuk

Offline Offline

Posts: 127



« Reply #8 on: August 07, 2008, 02:39:24 PM »

I have updated the module for WB 2.7 for multiple groups.

Theres probably some redundant code in there.

The updated module is attatched.
« Last Edit: August 07, 2008, 03:17:14 PM by fsuk » Logged

You say deviant like its a bad thing...
aldus

Offline Offline

Posts: 1238


« Reply #9 on: August 07, 2008, 03:04:10 PM »

Sorry for the german:
so:
I cleaned it a little bit up ... e.g. no nessesay new database() needed,
and collecting the data before echo.

where are two variables left
- $old_admin_users und
- $admin_users.

both of them are only used one time - and never more; so they can be left/removed.

Regards
Aldus
« Last Edit: August 07, 2008, 03:08:01 PM by aldus » Logged
fsuk

Offline Offline

Posts: 127



« Reply #10 on: August 07, 2008, 03:10:42 PM »

Thanks ill add it to the zip in my previous post
Logged

You say deviant like its a bad thing...
aldus

Offline Offline

Posts: 1238


« Reply #11 on: August 07, 2008, 03:23:15 PM »

But please test it before  grin
I've made mass. changes ...

Regards
Aldus
Logged
fsuk

Offline Offline

Posts: 127



« Reply #12 on: August 07, 2008, 03:26:08 PM »

Yup it works fine, although i had to remore /n from the end of the Edit Page line as it wasnt starting a new line just printing '/n'
Logged

You say deviant like its a bad thing...
TN

Offline Offline

Posts: 20


« Reply #13 on: September 07, 2008, 01:50:17 PM »

I swear it wasn't there before!  grin

You can see the attachment only if you are logged in, if you have cookies allowed und if you have javascript allowed.

I think: not everybody should gets the code   evil
Logged
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4868



« Reply #14 on: September 18, 2008, 08:19:55 PM »

Hello!
This is a great upgrade!

I only have one question:
How can I modify the
<?php frontend_edit(); ?> 
so I get a message when this snippet is not installed.

Thanks in advance.
Stefek
« Last Edit: September 18, 2008, 09:43:48 PM by Stefek » Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
doc
Guest
« Reply #15 on: September 18, 2008, 09:07:05 PM »

Hi,

like done for the register_frontend_m odfiles function called in the index.php of the most templates out there, so:

Code:
<?php
if (function_exists('frontend_edit')) {
  
frontend_edit();
} else {
  echo 
'Sorry, to use this function, you need to install the code snippet xxx first.';
}
?>

Regards Christian
« Last Edit: September 18, 2008, 10:17:51 PM by doc » Logged
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4868



« Reply #16 on: September 18, 2008, 09:44:22 PM »

Thanks Christian!

Regards,
Stefek
Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
mr-fan

Offline Offline

Posts: 1555


WWW
« Reply #17 on: September 22, 2008, 06:35:09 PM »

i have a question about the frontedit...

is it possible to make it easyer for a simple editor, after he made changes to his site, that he can with one click back to frontend.... or is this to complex in the backend....

or is there a other option that makes a sucess from a user to only one site to edit...save and look changes....in the frontend?

mfg mr-fan
Logged

 
erpe

Offline Offline

Posts: 2077


WWW
« Reply #18 on: September 23, 2008, 07:27:04 AM »

A click to the button and he turns to the frontend  in new tab (see image)

rgds

erpe
Logged

mr-fan

Offline Offline

Posts: 1555


WWW
« Reply #19 on: September 23, 2008, 11:20:01 AM »

ups.... sry i only used the big red one  grin

my brain is jumping to fast to think..... rolleyes

greets
Logged

 
jrast

Offline Offline

Posts: 315



« Reply #20 on: February 23, 2009, 10:59:39 AM »

If i want to add a new group, i get this error:
Code:
Parse error: syntax error, unexpected T_VARIABLE in /home/opentopo/public_html/wb/modules/frontedit2.7/info.php on line 1

So, why do i get a error from a snippet if i want to add a new group in the WB backend? for me a strange thing...

@edit:
ok, Problem found.
the info.php file was in a wrong format and there was no white space betwen the <?php tag and the first variable.
« Last Edit: February 23, 2009, 11:21:31 AM by jrast » Logged

- If life turns bad, just hang on! -
solbu

Offline Offline

Posts: 22


« Reply #21 on: March 12, 2009, 08:13:28 PM »

This module adds an image in template where ever you put the code
<?php frontend_edit(); ?> if the logged in account is allowed to edit the page.
I have a bug report.
If one use the Search function to search the portal as guest and is not logged in, the Edit link, with the image, shows up regardless of whether one is loged in or not. Clicking the Edit link results in one having to login thou, but still, it should not be displayed.

This only happens on the search page. (websitebakerurl/search/index.php)


I have tried to locate why it show up there as guest, but I am unable to figure it out.
Logged

My posts are licensed under a Creative Commons license
mr-fan

Offline Offline

Posts: 1555


WWW
« Reply #22 on: March 12, 2009, 09:29:47 PM »

Quote
I have a bug report.
If one use the Search function to search the portal as guest and is not logged in, the Edit link, with the image, shows up regardless of whether one is loged in or not. Clicking the Edit link results in one having to login thou, but still, it should not be displayed.

This only happens on the search page. (websitebakerurl/search/index.php)

i just have a short try - i don't can confirm this on my site! we have a site with the maincontent is for unregistered/unlogged in users and a short part is for spezial users with login!

i've the frontedit placed in the site - with your report i've tryed out imediatly but no such manner in my case!

mean guest in your case - no login or no access to edit a site??

because if you logged in and have no access to edit site - the fronteditbutton will display anyway...

rgds martin
Logged

 
solbu

Offline Offline

Posts: 22


« Reply #23 on: March 12, 2009, 09:46:53 PM »

mean guest in your case - no login or no access to edit a site??
Correct. The user is not logged in.
On every page on the site, guest users do not see the image. However if the guest user use the search function, the edit image appears also for guests.

This happens Only on the /search/index.php page, where the search results also apears.
Logged

My posts are licensed under a Creative Commons license
solbu

Offline Offline

Posts: 22


« Reply #24 on: March 13, 2009, 02:34:22 PM »

On every page on the site, guest users do not see the image. However if the guest user use the search function, the edit image appears also for guests.

This happens Only on the /search/index.php page, where the search results also apears.
I have just noticed another problem, that might help in debugging. Logged in users Do Not get the Edit image on the search page. The site owner noticed it.

We are in the process of launching a new design, using WebsiteBaker for the first time, and are trying various things. Smiley This is the last remaning bug we need to resolve before we can launch the new CMS.
« Last Edit: March 13, 2009, 02:36:20 PM by solbu » Logged

My posts are licensed under a Creative Commons license
Pages: [1] 2   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!