Module: Pages

rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Fri, 2011-07-22 19:09

Works fine for me -- I created a simple test page using pages, turned on translation mode, and translated the title and body to Spanish:
http://eric2001.brinkster.net/gallery3/index.php/pages/show/test

As I said before, there might be an issue translating the page "body" as the module runs the entire thing through gallery's translation system as one long string (I'll have to do some more testing with this to see if Gallery can handle translating more complex pages), but you should at least be able to translate the title, menus and everything else. Is that not happening?

 
kukrapok
kukrapok's picture

Joined: 2011-07-16
Posts: 32
Posted: Fri, 2011-07-22 19:44

Hmm I'll do more testing. At first I couldn't find neither the body text NOR the page name. Will get back to you ASAP, meaning tomorrow or 2 weeks later (off on vacations). Thanks for your work and reactivity!

EDIT: confirmed, couldn't get it translatable here. Added a new page with name 'test', title 'test page', body text 'body text', changed to French, turned on translation mode, can't find the new texts in list either in admin (edit) or user (view) mode.
Hm hm I wonder what I'm missing..

 
kukrapok
kukrapok's picture

Joined: 2011-07-16
Posts: 32
Posted: Fri, 2011-07-22 20:06

Hah! I got it to work!
I reinstalled all pages/ files.. Now I can translate the strings in user (view) mode. A big thanks, rWatcher!!

 
zjohn13

Joined: 2010-12-01
Posts: 94
Posted: Sat, 2011-07-30 07:50

Is there a limit to how much text that can be added to a page and where is the page stored please?
I have created a large page that displays fine but errors when I try to edit it, see below.
Smaller pages edit OK.

UPDATE
I am now getting this error when trying to edit all pages.
Prior to this I updated HTML Purifier from v1 to v2, reverted back to v1 but that did not help.
Any indication from the error message?

remove Platform information

Host name: mars.svr6-speedyservers.com
Operating system: Linux 2.6.18-338.12.1.el5.lve0.8.34
Apache: Unknown
PHP: 5.2.17
MySQL: 5.0.92-community
Server load: 0.07 0.2 0.2
Graphics toolkit: imagemagick

remove Gallery stats

Version: 3.0.2 (Coollanta)
Albums: 164
Photos: 4434

ErrorException [ Runtime Message ]: Undefined offset: 0

MODPATH/forge/libraries/Form_Input.php[ 81 ]
76 { 77 // Do nothing. The name should stay static once it is set. 78 } 79 else 80 { 81 $this->data[$method] = $args[0]; 82 } 83 84 return $this; 85 } 86

MODPATH/forge/libraries/Form_Input.php[ 81 ] » gallery_error_Core::error_handler()

MODPATH/pages/controllers/admin_pages.php[ 221 ] » Form_Input_Core->__call( arguments )

MODPATH/pages/controllers/admin_pages.php[ 221 ] » Form_Input->readonly()

MODPATH/pages/controllers/admin_pages.php[ 240 ] » Admin_Pages_Controller->get_overwrite_page_form( arguments )

MODPATH/pages/controllers/admin_pages.php[ 46 ] » Admin_Pages_Controller->get_edit_page_form( arguments )

{PHP internal call} » Admin_Pages_Controller->editpage( arguments )

MODPATH/gallery/controllers/admin.php[ 62 ] » call_user_func_array( arguments )

{PHP internal call} » Admin_Controller->__call( arguments )

SYSPATH/core/Kohana.php[ 331 ] » ReflectionMethod->invokeArgs( arguments )

{PHP internal call} » Kohana_Core::instance( arguments )

SYSPATH/core/Event.php[ 208 ] » call_user_func_array( arguments )

APPPATH/Bootstrap.php[ 67 ] » Event_Core::run( arguments )

DOCROOT/index.php[ 102 ] » require( arguments )

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Sun, 2011-07-31 18:05
zjohn13 wrote:
Is there a limit to how much text that can be added to a page and where is the page stored please?

The limit is ~64kb per page, anything longer then that should be automatically cut off. Page data is stored in Gallery's database in the "static_pages" table.

If you'd like to copy the contents of your large page into a text file and post it here, I'll see if I can reproduce the error with it, and try and figure out what's going on.

 
zjohn13

Joined: 2010-12-01
Posts: 94
Posted: Mon, 2011-08-01 06:29

rWatcher - Thanks for the info and offer to help with my Pages but I have now solved the problem.

While being helped with problem on another module I was advised to install a local.php file to display error messages as shown on the FAQ page.

Quote:
Try following these steps and place your Gallery3 into debug mode and see if it provides any information.
http://codex.gallery2.org/Gallery3:FAQ#How_do_I_see_debug_information.3F

This worked as expected and assisted in resolving that issue.

However, I left the file in place thinking that it may be useful if I had any other issues but having now removed it all my Pages module files can now be edited.
It's a bit bizarre that a tool for displaying errors actually creates one in this situation, still we live and learn. :-)

 
klinion

Joined: 2009-02-26
Posts: 180
Posted: Tue, 2011-08-09 19:26

Hi,
Love the "Pages" module, thanks.Am adding a "more info" link to thumbs and the full size example;- http://talkingwalk.com/gallerywalk/PHOTOWALK/Kens-Albums/SECOND-SUMMER-WALK/White-Foxglove and would like to return to the thumb/photo page

Is there any way of adding a "Back Button" on to the bottom of pages. Have been trying for ages with
<form><input onclick="history.go(-1);return true;" type="button" value="Back" />&nbsp;</form> and others.

It works on drupal nodes but just creates a button with no link happening in "Pages". It removes part of the code leaving <form><input value="Back" type="button">&nbsp;</form>

Thanks Again
Ken

www.talkingwalk.com/gallerywalk

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2011-08-09 19:39

The purifier module might help in this case.
Have you tried that?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
klinion

Joined: 2009-02-26
Posts: 180
Posted: Tue, 2011-08-09 20:13

Thanks Dave,
Yes. I have the html Purifier module enabled,

Ken

www.talkingwalk.com/gallerywalk

 
widdershins

Joined: 2011-08-10
Posts: 5
Posted: Sun, 2011-08-14 21:59
zjohn13 wrote:
rWatcher - Thanks for the info and offer to help with my Pages but I have now solved the problem.

While being helped with problem on another module I was advised to install a local.php file to display error messages as shown on the FAQ page.

Quote:
Try following these steps and place your Gallery3 into debug mode and see if it provides any information.
http://codex.gallery2.org/Gallery3:FAQ#How_do_I_see_debug_information.3F

This worked as expected and assisted in resolving that issue.

However, I left the file in place thinking that it may be useful if I had any other issues but having now removed it all my Pages module files can now be edited.
It's a bit bizarre that a tool for displaying errors actually creates one in this situation, still we live and learn. :-)

Thanks for sharing, I was searching on that error message in relation to problems with a contact form - contactowner 2 - I'd installed local.php whilst looking at another issue and had forgotten to remove it. It works fine now I've deleted local.php. :)

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Mon, 2011-08-15 18:11
klinion wrote:
Hi,
Love the "Pages" module, thanks.Am adding a "more info" link to thumbs and the full size example;- http://talkingwalk.com/gallerywalk/PHOTOWALK/Kens-Albums/SECOND-SUMMER-WALK/White-Foxglove and would like to return to the thumb/photo page

Is there any way of adding a "Back Button" on to the bottom of pages. Have been trying for ages with
<form><input onclick="history.go(-1);return true;" type="button" value="Back" />&nbsp;</form> and others.

It works on drupal nodes but just creates a button with no link happening in "Pages". It removes part of the code leaving <form><input value="Back" type="button">&nbsp;</form>

Thanks Again
Ken

www.talkingwalk.com/gallerywalk

This appears to be an issue with jHtmlArea:
http://jhtmlarea.codeplex.com/discussions/264324

If anyone would like to recommend an alternate jQuery compatable WYSIWYG HTML Editor that allows scripts I'd be happy to look into switching it into the module.

 
klinion

Joined: 2009-02-26
Posts: 180
Posted: Wed, 2011-08-17 17:50

rWatcher,
Thanks. Thought it was me. Don't know if this helps but I use, in drupal, CKEditor - http://docs.cksource.com/
Ken

www.talkingwalk.com/gallerywalk

 
inwedes
inwedes's picture

Joined: 2011-08-25
Posts: 2
Posted: Thu, 2011-08-25 13:56

Hello, i very new in G3 and like Pages. In Wind it works fine. But in my Dark Dragon Configuration only the Links to the Pages appears but no content on the Pages :-(
What can cause this!? What can help?

__update: sorry, i got the idea to check all other modules off, it workes, finaly i idetifyed that the basket modul is the problem http://codex.gallery2.org/Gallery3:Modules:basket
any ideas?

Thanks to all
Michael

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2011-08-25 15:37

It works for me with the wind theme so try that and start a new thread with your findings.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
quetch

Joined: 2011-09-02
Posts: 2
Posted: Fri, 2011-09-02 12:58

Hello to all.
I installed the module and I wondered if it was possible to incorporate the module comments. So in every static page the visitor could leave a comment.
Thank you for your help and sorry for my english.

 
quetch

Joined: 2011-09-02
Posts: 2
Posted: Sat, 2011-09-03 17:55

Hello to all, after several essays, I did not still find a solution of my problem.
Other question than I settled: how to show the right column (flows RSS, information of the album) on every static page?
Thank you for your answers.

 
ferthalangur
ferthalangur's picture

Joined: 2011-09-06
Posts: 2
Posted: Wed, 2011-09-07 20:25

Hi,

I am a new G3 user. I installed and enabled the Pages module according to the directions, but I do not get an Admin -> Settings -> Pages
menu. This is a fairly vanilla G3.02 configuration, with the default Theme, and mostly configured with G3 defaults.

The following additional modules are installed: Database Info, DownloadAlbum, Pages.

The following modules are enabled: Comments, Database Info, DownloadAlbum, Gallery3, Gallery Stats, Info, Organize, Pages, RSS, Search,
Server Add, Slideshow, Tags, Users and Groups.

Any suggestions on what I should look at/for?

_rob_

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2011-09-08 22:30

I will adjust the docs to the new method of adding pages since it changed recently.
Admin -> Content -> Pages Settings

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
ferthalangur
ferthalangur's picture

Joined: 2011-09-06
Posts: 2
Posted: Fri, 2011-09-09 19:11

Oh ... duh ... there it is. I did not think to look there for it.

Thanks Dave!

 
klinion

Joined: 2009-02-26
Posts: 180
Posted: Wed, 2011-10-05 21:18

Hi,
An answer to my question regarding a back button on every page. Go to;- modules/pages/views/pages_display.html.php and add <a href="javascript:history.go(-1)">Go Back</a> at the bottom

www.talkingwalk.com/gallerywalk

 
klaptun

Joined: 2011-10-16
Posts: 1
Posted: Sun, 2011-10-16 17:31

Hello,
I would like to add an iframe tag to a page, but can't save it after - Gallery removes this tag. Is such embedding possible?

Thanks in advance and sorry for my bad English :)

Stan

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2011-10-16 18:54

klaptun,
not tested... but try the purifier module.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Sun, 2011-10-16 21:05

The rich text editor strips out a bunch of "unsafe" tags, iframe is probably one of them.

 
crystalgirl

Joined: 2011-09-27
Posts: 36
Posted: Mon, 2011-10-17 11:20

Pages is a very useful module, glad to have it!

I'd like to add
<meta name="keywords" content="..." />
<meta name="description" content="..." />
to each of my pages. Ideally, it would be unique for each page, but I can live with for something more generic that applies all pages.

The MetaDescription module does not apply to pages since pages don't have tags.

Can someone tell me if this is just a few lines of code that can be added to existing files within the Pages Module? And if so, which file?

Thanks much!
CrystalGirl

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Mon, 2011-10-17 17:29

Short answer -- there's no easy way to do that.

Long answer -- "Pages" are based upon your themes page.html.php file:
http://github.com/gallery/gallery3/blob/master/themes/wind/views/page.html.php
You could try inserting something there, but it'll show up on every page, not just ones for pages. If you do so, you might also want to insert some code like "if (!$theme->item())" around the meta lines so they won't show up on album/photo pages.

 
crystalgirl

Joined: 2011-09-27
Posts: 36
Posted: Mon, 2011-10-17 19:31

Hi,

Thanks for the suggestion....it is sort of working. I'm using clean_canvas theme.

Following this line...
<?= $theme->head() ?>

I inserted these 3 lines:
<? if (!$theme->item())?>
<meta name="keywords" content="Keywords" />
<meta name="description" content="Description" />

Based on the code above, the 2 metatags are appearing on every page, including albums and photos. Is the syntax above wrong? or is this not the right condition to test for?

Thanks for your assistance...hopefully we can get it to perform the desired outcome.

CrystalGirl

 
crystalgirl

Joined: 2011-09-27
Posts: 36
Posted: Tue, 2011-10-18 01:58

I have code in place that seems to be working to put meta tags on PAGES.

Following this line...
<?= $theme->head() ?>

<? if ($theme->page_subtype != "photo" AND $theme->page_type != "collection"): ?>
<meta name="keywords" content="Keywords" />
<meta name="description" content="Description" />
<? endif ?>

Does anyone know any bad side effects to using these conditions / code?

Thanks,
CrystalGirl

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Tue, 2011-10-18 05:04
crystalgirl wrote:
I have code in place that seems to be working to put meta tags on PAGES.

Following this line...
<?= $theme->head() ?>

<? if ($theme->page_subtype != "photo" AND $theme->page_type != "collection"): ?>
<meta name="keywords" content="Keywords" />
<meta name="description" content="Description" />
<? endif ?>

Does anyone know any bad side effects to using these conditions / code?

Thanks,
CrystalGirl

I believe you're meta tags would still show up on movie pages (if you have any) and possibly other non-photo/non-collection modules (ContactOwner for example) if you're using any. Otherwise I think that should be good.

 
tenneck

Joined: 2011-03-10
Posts: 56
Posted: Tue, 2011-11-01 09:39

Is it possible to edit the permissions of viewing the PAGES?
For instance: Group 1 is allowed to view the PAGES and group 2 not.

 
tenneck

Joined: 2011-03-10
Posts: 56
Posted: Wed, 2011-11-02 16:05

any idea?

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Wed, 2011-11-09 21:23

Pages are all publicly viewable, they are not tied into Gallery's permission system at all.

 
mjapix

Joined: 2011-12-09
Posts: 4
Posted: Fri, 2011-12-09 14:15

Hi there!
Just start to use the Page-Module and i like it. But: there is no Standard-Footer on each Page of the page-module. How can i handle that?

greetings!

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Thu, 2011-12-15 04:56
mjapix wrote:
Hi there!
Just start to use the Page-Module and i like it. But: there is no Standard-Footer on each Page of the page-module. How can i handle that?

greetings!

The default gallery footer ("Powered by Gallery 3.0.2 (Coollanta)") shows up at the bottom of the pages for me, or are you referring to something else? Example:
http://eric2001.brinkster.net/gallery3/index.php/pages/show/test

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Mon, 2012-01-09 20:24

This module function ""Hide sidebar on Pages?" does not work on GreyDragon 3.1.3 theme.

Any suggestion to fix this?

 
nogates

Joined: 2011-04-13
Posts: 26
Posted: Tue, 2012-03-13 06:27

I have the same question.
how to put that so it show in page.

<?
include_once("weather.class.php");

$weather = new getWeather();
$weather->dbUser="*********";
$weather->dbPass="********";
$weather->dbName="*********";
$weather->cityCode="qc-147";
if ($weather->fetchData()){
echo "<td>\n\n".$weather->showCurrent()."\n</td></tr>\n";
}
$weather->cityCode="qc-147";
$weather->dispFormat=2;
$weather->longText=true;
if ($weather->fetchData()){
echo "<td>\n\n".$weather->showWeather()."\n</td>";
}
echo "</table>";
?>

I try to edite code_block.php but no go.
The script come from there: http://www.bedpan.ca/weather2.php?ShowAll=true
Any clu how to show that in gallery as a block or a page?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2012-04-13 19:15
photonav wrote:
I use html in module pages to show my iframe but it can't show it... Please help...

One solution but comes at some XSS risk:
Edit gallery3/application/config/config.php
find:
$config["global_xss_filtering"] = TRUE;
change to:
$config["global_xss_filtering"] = FALSE;
I will do some experimenting to see if only the admin can over-ride that setting in a module as it will be a security risk.
Also from the docs:
http://docs.kohanaphp.com/general/configuration/config
Is says you can use the HTML purifier module:
$config['global_xss_filtering'] = 'htmlpurifier';
but have not tested it yet.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
SilentHunter

Joined: 2012-04-25
Posts: 4
Posted: Thu, 2012-04-26 09:56

Hello,

first: thanks for that great module!

And a question, ofcourse: after installing the module, the pages in the sidebar get sorted by alphabet. Is there a possibility to get another sorting, without renaming the page titles?

Thank you.

Kind regards,
SilentHunter
________________________
Vault 114 - Urban Exploration

 
tenneck

Joined: 2011-03-10
Posts: 56
Posted: Thu, 2012-05-03 18:55

Hello,

is there a way to implement javascript code on page sites?

thanks

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Tue, 2012-07-03 20:08

Updated Pages module:
- Attempted to get around Gallerys XSS filtering when saving pages -- it works for me, but your results may vary.
- Added option to disable the rich-text editor, should you so desire.
- Added breadcrumbs to Pages.
- Increased module version number to 3.
Download: http://gallery.menalto.com/files/pages.zip

 
teodorsavic

Joined: 2012-07-19
Posts: 10
Posted: Thu, 2012-07-19 05:45

Hi! First of all, thank you for this great module.

Now the question..:) I was trying to remove the /pages/show/ from url and I was editing many things( I don't even know which), and now I get #.UAeXSGFo3Vo at the end of every url.. I don't know what I did, but something is wrong now.. My knowledge about this is very, very limited and everything I did is actually googling and then trial and error.. I reinstalled pages module but the problem is still here..

Any ideas how to fix this?

One more question.. Is there any way to create a static page e.g. home, and then do this..
When someone enters www.mydomain.com that static page would open, and the gallery root will be e.g. www.mydomain.com/gallery or something like that.. I don't want the gallery root to open as a home page, I want it to be at some other url..

Thank you very much!

 
ravaihen

Joined: 2012-07-19
Posts: 1
Posted: Thu, 2012-07-19 08:05

Is there a method to change themes or rather just the way the contents are arranged like editing the css file or something??

 
hareslade

Joined: 2006-07-16
Posts: 20
Posted: Fri, 2012-08-24 17:33

HI, I installed the v3 pages module on gallery3.0.4 with php5.3.10 and local.php to detect errors, when i try to edit an existing page, [submit the form] i get

ErrorException [ Runtime Message ]:
Undefined offset: 0
from gallery 3's /forge/libraries/Form_Input.php[line 81 ]

is it a dodgy method in the page classes somewhere, can anyone fix the bug?
$this->data[$method] = $args[0];

works ok with no local.php causig error detection.

 
soundlover

Joined: 2012-09-08
Posts: 10
Posted: Sun, 2012-09-09 19:13

In albums link is not working. When I hove over the page I see that the album name is being added to the link?
Why is that happening?

 
soundlover

Joined: 2012-09-08
Posts: 10
Posted: Sun, 2012-09-09 18:52
bigu_c wrote:
This module function ""Hide sidebar on Pages?" does not work on GreyDragon 3.1.3 theme.

Any suggestion to fix this?

Its easy, remove the pages links block from active to available.

 
dnm2dnm

Joined: 2012-11-13
Posts: 1
Posted: Tue, 2012-11-13 04:55

The idea of this module is great but I cannot even test it because I got "Internal Server Error(500)" when I am trying to access the page with only one word.
Any ideas how to fix this?

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Tue, 2012-11-27 21:34
dnm2dnm wrote:
The idea of this module is great but I cannot even test it because I got "Internal Server Error(500)" when I am trying to access the page with only one word.
Any ideas how to fix this?

Works fine for me:
http://eric2001.brinkster.net/gallery3/index.php/pages/show/test

 
xeta

Joined: 2011-11-24
Posts: 42
Posted: Sun, 2013-01-06 17:50

I am using this Seo Mod http://gallery.menalto.com/gallery_3_seo. There is a incompatibility with the pages module.

User can access the created pages, but the admin link …admin/pages/edit?page=3 is formed to …/admin/pages/editpage/3. For this reason with the the SEO Mod turned on the Pages are not editable.

I have already tried to edit the modrewrite code (RewriteRule ^(.*)page/([^/\.]+)/?$ $1?page=$2 [L]) but I was not able to get it to work...

Would it be possible to rename "pages" to for example "blog" to bypass this problem?

www.xeta.at

 
jillsy

Joined: 2013-01-17
Posts: 1
Posted: Thu, 2013-01-17 03:10

Thanks so much for creating this module. I am having a problem with it, but I see many positive comments from others so I'm sure it must be good.

My problem is nothing I enter in the textarea is retained. I am also running the HTML Purifier module and I thought that might be causing the problem, but I turned it off and I still can't get my page content to save. The name and title are saved, but not the actual content.

I'm running Gallery 3.0.4. Does anyone know what I'm doing wrong?

Thanks.

 
xeta

Joined: 2011-11-24
Posts: 42
Posted: Sun, 2013-01-20 07:09

No ideas on the SEO problem?

www.xeta.at

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Tue, 2013-02-12 21:43

For anyone else that's looking and finds this thread:

xeta wrote:
No ideas on the SEO problem?

"Try adding RewriteCond %{THE_REQUEST} !^(.*)?/admin/(.*) after the 2nd line."
http://galleryproject.org/node/110874#comment-401528