Avatar

New release (2.3) (General)

by Alex ⌂, Saturday, September 03, 2011, 07:50 (4640 days ago)

Hi there!

A new release is available: my little forum 2.3

There is nothing really noticeable new in this release (changelog), most changes are under-the-hood improvements and updates. The biggest change is the update of the Smarty template engine (version 2 to 3) and the necessary changes in the back end, templates and language files. Also, PHP 5 is required now (as Smarty 3 requires it).

Most of the language files are still incomplete but in most of them only a few strings are missing (search for <!-- TODO -->). If you translate them, please edit the file in the localization wiki (requires registration/login), send me the updated language file ( alex at mylittleforum dot net ) or post the translations here. Thank you!

Alex

Avatar

New release (2.3)

by Micha ⌂, Saturday, September 03, 2011, 09:40 (4640 days ago) @ Alex

Hi,

I update now. It is usefull to switch to the default-template befor updating the software; otherwise, you will get a blank page. The causation is the change in the main.tmpl-file.

kind regards
Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Smarty 3 and {php}

by edkgb, Sunday, September 04, 2011, 11:15 (4639 days ago) @ Alex

Hi Milo,
Is it possible for you to help me. I have just updated and have a problem.

In my main.tbl file I had an include:
{php}
include( $_SERVER['DOCUMENT_ROOT'].'/public/includes/navbar.inc');
{/php}

This does not work with the new version of MLF

I have tried things like:
{include_php $_SERVER['DOCUMENT_ROOT'].'/public/includes/navbar.inc'}

Nothing seems to work.
I'm pulling my hair out (almost bald anyway)
I hope you or someone can help me before I go mad.

Many thanks
Eddie

Avatar

Smarty 3 and {php}

by Micha ⌂, Sunday, September 04, 2011, 11:52 (4639 days ago) @ edkgb

Hi,

Is it possible for you to help me. I have just updated and have a problem.

In my main.tbl file I had an include:
{php}
include( $_SERVER['DOCUMENT_ROOT'].'/public/includes/navbar.inc');
{/php}

According to the documentation, it seems to be correct. Do you really need the global array $_SERVER to include a file?

regards
Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar

Smarty 3 and {php}

by Alex ⌂, Sunday, September 04, 2011, 12:25 (4639 days ago) @ edkgb

Hi Eddie!

The Smarty 2->3 upgrade notes say:

The {php} tag is disabled by default. The use of {php} tags is deprecated. It can be enabled with $smarty->allow_php_tag=true.

So you could try to add

$smarty->allow_php_tag=true;

after

$smarty = new Smarty;

in index.php (line 36).

Alex

Smarty 3 and {php}

by edkgb, Sunday, September 04, 2011, 12:29 (4639 days ago) @ Micha

Hi Micha many thanks for getting back to me.

I think I've tried every thing I can think of including taking the global array out.

I even moved navbar.inc to the Themes directory thinking that it might be a security issue.

Embedding the file into the main.tbl is the only thing that seems to work but that is pretty useless as its a navigation memu that used on many other pages.

As soon as I insert {php}***{/php} or {include_php *** } I get a blank screen.

Eddie

Smarty 3 and {php}

by edkgb, Sunday, September 04, 2011, 12:44 (4639 days ago) @ Alex

Hi Eddie!

The Smarty 2->3 upgrade notes say:

The {php} tag is disabled by default. The use of {php} tags is deprecated. It can be enabled with $smarty->allow_php_tag=true.


So you could try to add

$smarty->allow_php_tag=true;

after

$smarty = new Smarty;

in index.php (line 36).

Alex


Great News
Many thanks Alex and Milo for your help.
Adding

$smarty->allow_php_tag=true;

works.

Much thanks and appreciation
Eddie

Avatar

Smarty 3 and {php}

by Alex ⌂, Sunday, September 04, 2011, 12:47 (4639 days ago) @ edkgb

Hi again!

{php}
include( $_SERVER['DOCUMENT_ROOT'].'/public/includes/navbar.inc');
{/php}

Is navbar.inc a php script? Otherwise I would just use {include}:

{include file="$theme/subtemplates/navbar.inc"}

Alex

Smarty 3 and {php}

by edkgb, Sunday, September 04, 2011, 13:26 (4639 days ago) @ Alex

Hi again!

{php}
include( $_SERVER['DOCUMENT_ROOT'].'/public/includes/navbar.inc');
{/php}


Is navbar.inc a php script? Otherwise I would just use {include}:

{include file="$theme/subtemplates/navbar.inc"}

Alex

Hi Alex,

Its just a file comprising <ul><li>hrefs with some class and id statements.

I tried {include '**'} and {include_php '**'} and {include file '**'}but they didn't work.

The inc file can't really be located in subtemplates as its used by a lot of my site and would mean doing a fairly major change.

Eddie

Avatar

New release (2.3)

by Alex ⌂, Sunday, September 04, 2011, 13:47 (4639 days ago) @ Micha

Hi Micha,

It is usefull to switch to the default-template befor updating the software; otherwise, you will get a blank page.

Thanks for the notice! The update script should really do that automatically in the future!

Alex

Avatar

New release (2.3)

by Micha ⌂, Sunday, September 04, 2011, 13:57 (4639 days ago) @ Alex

Hej Alex,

The update script should really do that automatically in the future!

That is a goog idea! +1

regards
Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Smarty 3 and {php}

by Peter, Monday, September 12, 2011, 06:49 (4631 days ago) @ edkgb
edited by Peter, Monday, September 12, 2011, 06:54

INCLUDE_PHP was deprecated in Smarty, and I had the same issue. Try this:

Put this near the bottom of index.php

## Your code
$navbar = file_get_contents($_SERVER['DOCUMENT_ROOT'].'/public/includes/navbar.inc');
$smarty -> assign ('navbar', $navbar);
 
## Existing code
$smarty->display($theme.'/'.$template); 
?>

Then stick

{$navbar}

in the tpl file(s).

Smarty 3 and {php}

by edkgb, Monday, September 12, 2011, 08:35 (4631 days ago) @ Peter

INCLUDE_PHP was deprecated in Smarty, and I had the same issue. Try this:

Put this near the bottom of index.php

## Your code
$navbar = file_get_contents($_SERVER['DOCUMENT_ROOT'].'/public/includes/navbar.inc');
$smarty -> assign ('navbar', $navbar);
 
## Existing code
$smarty->display($theme.'/'.$template); 
?>

Then stick

{$navbar}

in the tpl file(s).

Hi Peter,
Many thanks for your reply, Yes it works perfectly you are 'The Man'.
I hate using depreciated terms but although I'm ok with PHP Smarty is a mystery to me.
I guess there must be many more users of MLF, that are having a similar problem, your solution is going to help them.
With grateful thanks once again.
Eddie

Smarty 3 and {php}

by Peter, Tuesday, September 13, 2011, 13:50 (4630 days ago) @ edkgb

I had to scratch my head a bit to figure out why it stopped working, but then I realized I could do the same thing with this approach, and that it's actually a better way. Keep in mind you can use this same approach to assign all kinds of new Smarty variables depending on familiar PHP logic; e.g., an {$adsense} variable that is assigned only when certain conditions are met, or a greeting that displays only on holidays. Just sprinkle the Smarty variables in the tpl files and put all the logic for them in index.php.

New release (2.3)

by koko ⌂ @, Russia, Saturday, September 17, 2011, 20:17 (4625 days ago) @ Alex

very good

I did not read the message. Now I have a white page.

by kt007, Sunday, October 23, 2011, 09:22 (4590 days ago) @ Micha

Hi,

I update now. It is usefull to switch to the default-template befor updating the software; otherwise, you will get a blank page. The causation is the change in the main.tmpl-file.

I did not read the message. Now I have a white page.

What should I do?

Avatar

I did not read the message. Now I have a white page.

by Micha ⌂, Sunday, October 23, 2011, 09:28 (4590 days ago) @ kt007

Hi,

I did not read the message. Now I have a white page.
What should I do?


Du you have phpmyadmin or, in general, do you have access to your sql-server?

1. upload the default-template via ftp
2. Select the sql settings-table (e.g. via phpmyadmin)
3. set row theme to default

kind regards
Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

I did not read the message. Now I have a white page.

by kt007, Sunday, October 23, 2011, 09:30 (4590 days ago) @ Micha

I should alter the sql tables, as I'm updating from 2.1 to 2.3

Avatar

I did not read the message. Now I have a white page.

by Micha ⌂, Sunday, October 23, 2011, 09:35 (4590 days ago) @ kt007

Hi,

I should alter the sql tables, as I'm updating from 2.1 to 2.3

Do you clear the templates_c-directory?

regards
Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Can't use chinese name?

by Esperanto ⌂ @, China, Wednesday, October 26, 2011, 05:55 (4587 days ago) @ Alex

Thanks for your forum. I like this forum.

But, when i test the forum, i can't use chinese name. When i use the word "世界语" as the Name, I can't post my message.you said:

•The user name contains invalid characters

New release (2.3) buttons "OK-Submit" missing

by Romina @, Wednesday, October 26, 2011, 16:24 (4587 days ago) @ Alex

When I update or make a fresh install of the new release, buttons "OK-Submit" and "Preview" at the bottom of the textarea are missing...
What am I doing wrong? Romina

Russian.lang updated for New release (2.3)

by Urfin, Wednesday, November 23, 2011, 08:47 (4559 days ago) @ Alex

Most of the language files are still incomplete but in most of them only a few strings are missing (search for <!-- TODO -->). If you translate them, please edit the file in the localization wiki (requires registration/login), send me the updated language file ( alex at mylittleforum dot net ) or post the translations here. Thank you!

Russian.Lang 2.3

translated description of "akismet_registered" option

by Urfin, Thursday, November 24, 2011, 09:17 (4558 days ago) @ Urfin

Russian.Lang 2.3 completed :ok:

Installing on Windows 7 Pro

by Kima @, Thursday, December 01, 2011, 22:32 (4550 days ago) @ Alex

I tried without success to install it on Windows 7.
Running the install script crash Apache.

I tried to run some of the program in XP3 mode as administrator.
UAC is disable.

Apache always crash during install.

Is there anywone who successfuly did it ?

Installing on Windows 7 Pro - Forgot to say

by Kima @, Thursday, December 01, 2011, 22:41 (4550 days ago) @ Kima

PHP & Apache comes The Uniform server.

RSS Feed of thread