2 small issues with a 1.6.8 installation

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
balltongu
Posts: 20
Joined: Fri Aug 20, 2004 5:21 am

2 small issues with a 1.6.8 installation

Post by balltongu »

Hello folks,

So I've got two things I'm hoping I can get a resolution on. The first is an issue with the displaying of articles.

When displaying an article with a large picture, the picture overlays the Top Ten and Five Newest entries. I'd like to be able to remove the right sidebar when viewing an article, but not when browsing for articles. template/artikle.tpl doesn't have it, and it only seems to appear in template/index.tpl, which of course if you comment out the right sidebar code it removes it completely. I'm not sure where to look, but it seems something like (this is very generally speaking) in index.php would be like:

if ($action != artikel) {
process regular template;
} else {
process template without sidebar;
}

This page will give you an idea of what I'm referring to.

http://www.accesscomm.ca/internet/faq2/ ... artlang=en

Also, I have an issue with the imagemanager is the wysiwyg editor. When I'm browsing the images, if I use the drop down list to choose another directory, or use the refresh button, I get an error message saying that I am not authorized. Any thoughts?

Thanks
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Re: 2 small issues with a 1.6.8 installation

Post by matteo »

Hi,
balltongu wrote:I'm not sure where to look, but it seems something like (this is very generally speaking) in index.php would be like:

if ($action != artikel) {
process regular template;
} else {
process template without sidebar;
}
you're close to the solution more than expected ;).
Take a look at the code of PMF 2.0.0 (snapshot or alpha package): in particular, the files index.php and the way we splitted the main template with a new section (rightBox), template/index.tpl to see how we move the right bar to template/startpage.tpl and tagcloud.tpl which in your case should be an empty file, e.g. empty.tpl.
balltongu wrote:Also, I have an issue with the imagemanager is the wysiwyg editor. When I'm browsing the images, if I use the drop down list to choose another directory, or use the refresh button, I get an error message saying that I am not authorized. Any thoughts?
it seems a bug: I'll take a look at the issue.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Re: 2 small issues with a 1.6.8 installation

Post by matteo »

Hi,
matteo wrote:it seems a bug: I'll take a look at the issue.
I've fixed the issue and just committed the fix into CVS.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
balltongu
Posts: 20
Joined: Fri Aug 20, 2004 5:21 am

Post by balltongu »

Hi,

I just tried today's snapshot and I'm still seeing the same issue with the image manager portion.

Balltongu
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
strange, could you try again after emptying your browser cache? The change has been done in admin/editor/plugins/ImageManager/assets/images.js, changeDir() function.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
balltongu
Posts: 20
Joined: Fri Aug 20, 2004 5:21 am

Post by balltongu »

I am so sorry man, my bad. You are correct it is now working. While we are on the topic of the imagemanager, I've got something else that's beyond this scope, but maybe you could take a look.

I see in the /admin/editor/plugins/ImageManager/config.inc.php there is an option for direction creation. It appears to be enabled by default, but there is no option when in the actual imagemanager. So, I went looking for it, and I see int /admin/editor/plugins/ImageManager/manager.php there is a few lines that are commented out:

Code: Select all

        <a href="#" onclick="javascript: goUpDir('<?php print $uin; ?>');" title="Directory Up"><img src="img/btnFolderUp.gi
f" height="15" width="15" alt="Directory Up" /></a>
<?php if($IMConfig['safe_mode'] == false && $IMConfig['allow_new_dir']) { ?>
        <a href="#" onclick="newFolder('<?php print $uin; ?>');" title="New Folder"><img src="img/btnFolderNew.gif" height="
15" width="15" alt="New Folder" /></a>
Uncommenting those allows me to use the goUpDir function, but the newFolder function gives another "You are not authorized" type of error. Now, obviously it was commented out for one reason or another, but I'd really be interested in making it work, otherwise it just means more work for me when other article creators want to organize their work into directories as I do.

Anyway, thanks again for the help on my previous problem, it's one more step towards making me NOT the sole maintainer of documentation around here :)

balltongu
balltongu
Posts: 20
Joined: Fri Aug 20, 2004 5:21 am

Post by balltongu »

This is what the apache log shows when my above attempt is made:

Code: Select all

[client 192.168.3.86] PHP Notice:  Undefined variable: auth in /var/www/html/internet/faq2/admin/editor/plugins/ImageManager/images.php on line 96, referer: http://www.accesscomm.ca/internet/faq2/admin/editor/plugins/ImageManager/newFolder.html?uin=b50d58414d1ed7fe09c28a369c497cb2
thanks,

balltongu
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
balltongu wrote:Uncommenting those allows me to use the goUpDir function, but the newFolder function gives another "You are not authorized" type of error. Now, obviously it was commented out for one reason or another, but I'd really be interested in making it work, otherwise it just means more work for me when other article creators want to organize their work into directories as I do.
I'll take a look at it.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
open the [PATH_TO_PMFINSTALL]/admin/editor/plugins/ImageManager/assets/images.js file and move the newFolder() function to be:

Code: Select all

	function newFolder(dir, newDir)
	{
		location.href = "images.php" + window.location.search + (window.location.search.length > 0 ? "&" : "?") + "dir=" + dir + "&newDir=" + newDir;
	}
Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
balltongu
Posts: 20
Joined: Fri Aug 20, 2004 5:21 am

Post by balltongu »

You, my good man, are my hero'o'the_month. I'll definitely buy you a beer for that one.
Post Reply