OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



OJS Plugin: Static Pages

The Plugin Gallery is a venue for users of PKP software to share their plugins.

Moderators: jmacgreg, michael, John

Forum rules
If you post a plugin here, please include information on which versions of which applications it is compatible with. Attach a tarball of the plugin (e.g. tar cvzf myPlugin-0.1.tar.gz plugins/generic/myPlugin). Thanks for contributing!

Rate this plugin

Terrible!
1
4%
Poor
0
No votes
OK
1
4%
Good
8
35%
Great!
13
57%
 
Total votes : 23

OJS Plugin: Static Pages

Postby jalperin » Sat Aug 09, 2008 7:51 am

This plugin is useful for creating Static Content.

Through the Journal Manager -> System Plugins interface, you can add/edit/delete pages that are comprised of text/HTML. Once a page is created, it can be accessed at: http://www.yourJournalUrl.../index.php/{journal_initials}/pages/view/{page_name}.

Author: Juan Pablo Alperin
Software: OJS
Versions: 2.2+
Multilingual: yes
Requirements: TinyMCE plugin must be enabled

Version History:
1.1 - August 15, 2008
* change of terminology (url -> path) to be consistent with rest of codebase
* added README
* added "view" link from management interface
* few other minor tweaks

1.0 - August 9, 2008
Initial release
Attachments
staticPages-1.1.tar.gz
Static Pages Plugin v. 1.1
(14.49 KiB) Downloaded 1559 times
jalperin
 
Posts: 154
Joined: Thu Jul 06, 2006 1:03 pm
Location: Buenos Aires

Re: OJS Plugin: Static Pages

Postby jalperin » Wed Nov 05, 2008 6:20 pm

This plugin is now available for OCS: http://pkp.sfu.ca/support/forum/viewtopic.php?f=28&t=3735
jalperin
 
Posts: 154
Joined: Thu Jul 06, 2006 1:03 pm
Location: Buenos Aires

Re: OJS Plugin: Static Pages

Postby ciberwing » Tue Nov 11, 2008 2:25 pm

Hi,

Thank You very Much, excelent module.

I have translated this module (v1.1) to spanish.

Anyone can download the attachment. I hope it helps.

--

Traduje este módulo, la traducción se puede descargar del adjunto. Espero que sirva.
Attachments
es_ES.zip
For install: Extract to pluginfolder/locale.
Done!
(1.11 KiB) Downloaded 388 times
ciberwing
 
Posts: 1
Joined: Tue Nov 11, 2008 2:16 pm

Re: OJS Plugin: Static Pages

Postby ssulger » Wed Nov 19, 2008 4:30 am

hello mr. alperin,

i have a question about the staticPages plugin you provided on the pkp support board. i downloaded the package and copied the directory to .../plugins/generic, but the php command you mention in the readme file (php tools/dbXMLtoSQL.php -schema execute plugins/generic/staticPages/schema.xml) results in the following error message:


DB Error: Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)
OJS: DB Error: Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)



can you give me any advice on what might be the problem here?
the machine i am running ojs on is an imac (os 10.4.11, powerpc g4 1 ghz).
thank you very much in advance for your help!

sebastian sulger
ssulger
 
Posts: 7
Joined: Tue Nov 11, 2008 2:25 am

Re: OJS Plugin: Static Pages

Postby ssulger » Fri Nov 21, 2008 5:53 am

i have found the solution - apparently php was looking for the mysql.sock in the wrong place. had to edit the php ini file.
the plugin works just fine now.

http://mac.delta-c.de/node/807

sebastian
ssulger
 
Posts: 7
Joined: Tue Nov 11, 2008 2:25 am

Re: OJS Plugin: Static Pages

Postby slave » Mon Dec 22, 2008 6:03 am

Hi japlerin and everybody!

I have question about plugin installation on virtual server - I don't have access to command line and I am not able to install the database schema using
Code: Select all
$ php tools/dbXMLtoSQL.php -schema execute plugins/generic/staticPages/schema.xml


Is it possible to install the database schema without access to command line?

Or maybe there is some simple method to create one static page within the OJC main window without using this plugin?

Any help would be appreciate :)
slave
 
Posts: 1
Joined: Mon Dec 22, 2008 5:13 am

Re: OJS Plugin: Static Pages

Postby jalperin » Mon Dec 29, 2008 2:33 pm

just as I was going to answer this post, Alec answered the same question in another post.

http://pkp.sfu.ca/support/forum/viewtopic.php?f=28&t=3735#p15132

hope this helps.
jalperin
 
Posts: 154
Joined: Thu Jul 06, 2006 1:03 pm
Location: Buenos Aires

Re: OJS Plugin: Static Pages

Postby Thalamus » Tue Jan 13, 2009 8:42 am

I am running Windows server IIS6.
How can I run the fiollowing line:
$ php tools/dbXMLtoSQL.php -schema execute plugins/generic/staticPages/schema.xml

There must be an easier way for Windows user to install and update OJS. It is becoming more and more frustrating to work around so many things as a "Non-Unix/Linux" user.
Sorry!
Thalamus
 
Posts: 28
Joined: Sat Nov 22, 2008 9:48 am

Re: OJS Plugin: Static Pages

Postby jmacgreg » Tue Jan 13, 2009 9:19 am

Hi Thalamus,

I haven't used PHP on Windows before, but you should be able to run commands from the command-line. You can open your command-line/terminal in Windows by clicking Start->Run ... and then running cmd.exe. The PHP Handbook has a section on setting up the PHP CLI: http://ca2.php.net/features.commandline, with lots of information depending on the version of PHP you are running. You may also want to try a Google search for 'php cli windows'.

Cheers,
James
jmacgreg
 
Posts: 4181
Joined: Tue Feb 14, 2006 10:50 am

Re: OJS Plugin: Static Pages

Postby jalperin » Thu Jan 15, 2009 1:11 am

All,

For those of you who cannot run the command to install the necessary tables, I am posting some SAMPLE SQL for MySQL. This will mostly likely work if you're running a recent MySQL version, but it has only been tested on MySQL 5.1.24 on my Macbook. You can run this command through the mysql command line, PhpMyAdmin, or any MySQL client you have installed locally.

Code: Select all
CREATE TABLE static_pages (
static_page_id           BIGINT NOT NULL AUTO_INCREMENT,
path                     VARCHAR(255) NOT NULL,
journal_id               BIGINT NOT NULL,
                PRIMARY KEY (static_page_id)
);

CREATE TABLE static_page_settings (
static_page_id           BIGINT NOT NULL,
locale                   VARCHAR(5) NOT NULL DEFAULT '',
setting_name             VARCHAR(255) NOT NULL,
setting_value            TEXT,
setting_type             VARCHAR(6) NOT NULL
);

ALTER TABLE static_page_settings ADD  INDEX static_page_settings_static_page_id  (static_page_id);

ALTER TABLE static_page_settings ADD  UNIQUE INDEX static_page_settings_pkey  (static_page_id, locale, setting_name);


Hope that helps,
jalperin
 
Posts: 154
Joined: Thu Jul 06, 2006 1:03 pm
Location: Buenos Aires

Re: OJS Plugin: Static Pages

Postby Thalamus » Thu Jan 15, 2009 9:07 am

PERFECT!
It works.
I ran the SQL query and it works now flawless.
Thousand thanks for this great plugin!
Roland
Thalamus
 
Posts: 28
Joined: Sat Nov 22, 2008 9:48 am

Re: OJS Plugin: Static Pages

Postby vlilloh » Tue Mar 10, 2009 4:48 am

This plugin works great but....

How to expand the maximum limit of content of a page?

Cheers.
Last edited by vlilloh on Thu May 13, 2010 8:07 am, edited 1 time in total.
vlilloh
 
Posts: 279
Joined: Thu Feb 07, 2008 3:35 am
Location: Murcia, Spain

Re: OJS Plugin: Static Pages

Postby jalperin » Tue Mar 10, 2009 7:04 am

Vicent

Could you check to see if the data is cut off in the database? It would be in the static_pages_settings table, in the setting_value column. If its getting cut off there, then you should change that column definition to either MEDIUMTEXT or LONGTEXT. See http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html for more details.
jalperin
 
Posts: 154
Joined: Thu Jul 06, 2006 1:03 pm
Location: Buenos Aires

Re: OJS Plugin: Static Pages

Postby vlilloh » Tue Mar 10, 2009 11:20 am

Juan Pablo,

thank you very much. Indeed it was so.

By the way, I have not been able to test your google search plugin. This week I hope :)

Cheers.
vlilloh
 
Posts: 279
Joined: Thu Feb 07, 2008 3:35 am
Location: Murcia, Spain

Re: OJS Plugin: Static Pages

Postby olofantur » Wed Jun 24, 2009 11:27 am

Hi,

First of all I'd like to thank you for this plugin. But I'm afraid I'could't make this plugin work for my OJS site. I created database tables according to script you gave and install this plugin. When I fill the form for creating a static page after I hit submit button page redirects me to the Plugins page and when I revisit the Static Pages plugin the page does not show up on the list. I've checked the database and I saw that both of the tables (static pages and static_page_settings) are empty.
I tried to turn database debugging on from config.inc but after I hit submit button I couldn't see any INSERT INTO statements.

I'm waiting for your help to make it work.

Thanks
olofantur
 
Posts: 1
Joined: Mon Jun 22, 2009 9:26 am

Next

Return to Plugin Gallery

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests