Diskussion:Gallery2wiki
Aus TransArte
[bearbeiten] Versions
I'm using MediaWiki 1.5 with Gallery2_beta2 and this doesn't work for me. What versions are working together for other people?
My proposal is to update to the latest and more secure versions.
[bearbeiten] templates
there seems to be a problem inside templates. here is the output of {{fototemplate}}:
see: http://bugzilla.wikimedia.org/show_bug.cgi?id=3438
instead, i would expect (and i need ;)) the following output:
i tested with a simple replace a -> x extension
and again : the template is not replaced by the extension. I'm guessing, that the templates were inserted at the end and do not pass the extension part.
to make the problem a bit clearer i wrote a small php script (see code below) add it into LocalSettings.php as usual and write one page [ [ template:sample ] ] wit the content abc and one page [ [ sample ] ] with the content abc and { { sample } } which should include template:sample.
the result is:
#ParserBeforeStrip[0]#*ParserAfterStrip[1]*%ParserBeforeTidy[2]%@ParserAfterTidy[3]@abc@@%%**## %ParserBeforeTidy[2]%@ParserAfterTidy[3]@abc@@%%
the interpretation of the result is, that a template does not pass 'ParserBeforeStrip' and 'ParserAfterStrip' or ignore the modifications somehow (&$ problem?). I don't want to modify the mediawiki code, as each update removes the own patches...
Here the sample extension: (don't forget LocalSettings.php)
<?php
define ("_PATT_", "abc");
$wgExtensionFunctions[] = 'myTestHook';
$my=0;
function myTestHook(){
global $wgHooks;
global $wgParser;
$wgHooks['ParserBeforeStrip'][]= 'pbs';
$wgHooks['ParserAfterStrip'][] = 'pas';
$wgHooks['ParserBeforeTidy'][] = 'pbt';
$wgHooks['ParserAfterTidy'][] = 'pat';
}
function pbs(&$article, &$text, &$strip_state){ global $my;
$text = preg_replace("/("._PATT_.")/i", "#ParserBeforeStrip[".($my++)."]#$1##" , $text );
}
function pas(&$article, &$text, &$strip_state){ global $my;
$text = preg_replace("/("._PATT_.")/i", "*ParserAfterStrip[".($my++)."]*$1**" , $text );
}
function pbt(&$article, &$text){ global $my;
$text = preg_replace("/("._PATT_.")/i", "%ParserBeforeTidy[".($my++)."]%$1%%" , $text );
}
function pat(&$article, &$text){ global $my;
$text = preg_replace("/("._PATT_.")/i", "@ParserAfterTidy[".($my++)."]@$1@@" , $text );
}
?>
[bearbeiten] Bharat Mediratta
This is unbelievably cool! I've integrated it into the official [Gallery Codex].
I had to fix a few issues in order to get it working: 1. PHP4 doesn't support stripos, so I converted those to strpos 2. the replaceR() function wasn't taking $text as a reference so it wouldn't actually replace the string in PHP4. 3. If you have two tags on the same line the parser fails because it uses a greedy regexp. I modified the regexen to be non-greedy, and in fact tightened them to use \d* instead of .* so that you don't parse past the bounds.
Here's an example of the bug that I fixed.
Thanks for the patch, i corrected the source and zip . Andres Obrero
[bearbeiten] great
Nice idea... keep up the good work
[bearbeiten] Useful
But i have a lot of questions. Some of them may be due to my ignorance of German. My Spanish and English are better than my German, alas.
Anyway, as i was trying the examples here and clicked on http://www.transarte.net/mediawiki/extensions/gallery2wiki_extension/images/galfolder.jpg, the menu to the left wasn't replaced by the new menu, it was just placed on top of it, and it was quite hard to read (with Firefox). I'm not sure if that's an intended feature or a bug.
- the transparency is set to 90% , but can be changed to 100%, so nothing from below is visible
It's great how the wikitars are created automagically. It's not clear to me how this works, though. First of all, is a separate copy of the image saved in wiki and in gallery (doubling the disk space)? Second, it seems a wikitar is created for each of several resolutions. Does that mean a separate copy of the image is saved to disk for each resolution that is converted to a wikitar? I have a tight disk space limitation on my site and don't want to have lots of copies of each image stored. If you could update the documentation to clarify, i'd really appreciate it.
- every image is handled by gallery2. All images sizes are rendered anyway from gallery2. If you do not set the sizes in gallery2, the do not appear in the wikatars
Finally, i'm wondering how the project is coming. I'd like to make use of it. If you are going to be releasing the rewrite soon, i'll wait. When you say somethings need to be rewritten, why is that?
- I'm integrating the nice galleryRemote extension (see [1] )
and i'm doing sort of slideshow for mediawiki
[bearbeiten] Configuration Options
There's no description anywhere of what to edit/configure in the "extensions/gallery2wiki_extension/gallery2wiki.settings.php" file.
My wiki and my gallery2 installation are in separate virtual hosts, but on the same server, so I'm not sure if I put URLs or pathnames in here. In particular, I think I need to edit:
$gallerySettings["galleryurl"]
$gallerySettings["gallerytreeurl"]
Anything else? I haven't been able to get the gallery icon to show up in my wiki edit screen yet...
[bearbeiten] No Gallery Icon on Toolbar
I've installed everything as per the instructions, but I do not get the new icon on the edit page toolbar...?
[bearbeiten] Windows
After a bit of debugging, it appeared that it was due to M$ Window$' backslashes in path names.
Look at the following line at the beginning of gallery2wiki.settings.php:
$gallerySettings["herepath"] = str_replace($_SERVER["DOCUMENT_ROOT"], "" ,dirname(__FILE__)); // this folder;
In this line, $_SERVER["DOCUMENT_ROOT"] and dirname(__FILE__) report path names with differring path separators (one with /, the other with \), which messes everything up...
This is probably a bug or "feature" of apache/php on Windows... However, replacing the offending line with the following 3 lines fixed the thing:
$docRoot = str_replace("\\", "/", $_SERVER["DOCUMENT_ROOT"]);
$dirName = str_replace("\\", "/", dirname(__FILE__));
$gallerySettings["herepath"] = str_replace($docRoot, "" , $dirName); // this folder;
This should still work on apache servers hosted on unix/linux servers. I'm not sure about Macs, though. I don't know whether \ is allowed in file and folder names on Macs, which could cause another mess in that case. Does someone have any clue?
[bearbeiten] FreeBSD
Hi, I'm not a php programmer but I spent some time digging around and hope you find it useful.
_SERVER[DOCUMENT_ROOT] = '/usr/local/www/data'</code> dirname(__FILE__) = '/usr/local/www/data-dist/wiki/extensions/gallery2wiki_extension'</code>
and
$gallerySettings["herepath"] = str_replace($_SERVER["DOCUMENT_ROOT"], "" ,dirname(__FILE__));
returns incorrect address """""-dist/wiki/extensions/gallery2wiki_extension"""""
As a general solution, why not? :
$gallery['herepath'] = $IP/extensions/gallery2wiki_extension
if the installer changes the name of the extension, then perhaps using the filename portion of dirname(__FILE__) .
I iterated over the SERVER array and dumped the values.
SERVER[ SERVER_SIGNATURE ] = <address>Apache/2.0.54 (FreeBSD) DAV/2 PHP/4.3.11 Server at 192.168.0.10 Port xxxx</address>
SERVER[ SERVER_SOFTWARE ] = Apache/2.0.54 (FreeBSD) DAV/2 PHP/4.3.11
SERVER[ SERVER_NAME ] = 192.168.0.10
SERVER[ SERVER_ADDR ] = 192.168.0.10
SERVER[ SERVER_PORT ] = xxxx
SERVER[ REMOTE_ADDR ] = 192.168.0.3
SERVER[ DOCUMENT_ROOT ] = /usr/local/www/data
SERVER[ SCRIPT_FILENAME ] = /usr/local/www/data/wiki/index.php
SERVER[ REQUEST_URI ] = /wiki/index.php/Xxx
SERVER[ SCRIPT_NAME ] = /wiki/index.php
SERVER[ PATH_INFO ] = /Xxx
SERVER[ PATH_TRANSLATED ] = /usr/local/www/data/Xxx
SERVER[ PHP_SELF ] = /wiki/index.php/Xxx
[bearbeiten] No Gallery button after "Preview," Custom Image Size Markup Doesn't Work
Everything is installed and seems to work properly, with just a couple of exceptions:
First, while the Gallery2 button appears during initial editing, it does not appear once I hit [Preview]; the edit box reappears with the WikiText for the page, but there's no Gallery2 button.
Second, adding: Diese ID ist keinem Bild zugeordnet: 6112 produces "320" (in red type) on the page instead of the image and its thumbnail at the requested size.
Any idea how to fix these two issues?
Thanks!
The first one can be solved by editing the file gallery2wiki.php, in function insertEditGallery2() you have to comment out following lines:
//if($action == "edit"){
$text = doGalleryChooser() . doGalleryImage( $title , false) . $text ;
//}else
// $text = doGalleryImage($title, true). $text ;
[bearbeiten] I know, I know, but Gallery2Wiki and IIS
I have a functioning MediaWiki and Gallery2 install on a Win2k box running IIS. I'm sure there's an issue with the path names, which should be able to be fixed, but not being a programmer, I'm at a loss. I've tried hacking some, and gotten very very limited functionality, but have been unable to browse the libraries.
I know this is really brief and lacking any useful information, but if there's
- Someone who already has it working with IIS, or
- Someone who'd help shove me the right way, I'd sure appreciate it.
John, in Austin, TX.
jelyon (at) mac (dot) com
[bearbeiten] Windows / IIS Configuration
An update to the code above. It would not work without the leading forward slash, as follows:
$docRoot = str_replace("\\", "/", $_SERVER["DOCUMENT_ROOT"]);
$dirName = str_replace("\\", "/", dirname(__FILE__));
$gallerySettings["herepath"] = "/" . str_replace($docRoot, "" , $dirName); // this folder;
The added code on the third line is:
"/" .
For debugging I also added this:
echo("<!-- herepath = " . $gallerySettings["herepath"] . " -->\n") ;
Shane Kenyon (skenyon(at)hws(dot).edu), Enterprise Architect, Hobart and William Smith Colleges
[bearbeiten] Thank you
I just wanted to thank you for writing and releasing this great product.
I wanted to tell you that I think that you should not waste your valuable web space responding to a spammer.
This is of course only my opinion, but I think that sometimes these people really get off on being "recognized". By stating publicly that you acknowledge his presence, he may be getting what he wants.
Thanks again for this great tool.
[bearbeiten] Error, have you got this?
I'm getting the following error:
Warning: requireonce(/home/xbsidesx/public_html/gallery2/modules/core/classes/../../../modules/customfield/classes/CustomFieldInterface_1_0.class): failed to open stream: File or dir not found in /home/xbsidesx/public_html/gallery2/modules/core/classes/GalleryCoreApi.class on line 2505
Fatal error: requireonce(): Failed opening required '/home/xbsidesx/public_html/gallery2/modules/core/classes/../../../modules/customfield/classes/CustomFieldInterface_1_0.class' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xbsidesx/public_html/gallery2/modules/core/classes/GalleryCoreApi.class on line 2505
I can't see the path (../../../) so I have no idea what is it trying to look for. I can't find this "CustomFieldInterface_1_0.class" file either. Can you please help me? I did all the recomendations.
ok, I managed it, so I think you need to update the list of "instructions" to install:
1. As Admin, install / activate Album Select module
* Album Select Addon: Zip or Tar.gz
* Site Admin » Admin Options » Modules » Blocks » Album Select
2. As Admin, install / activate Custom Fields module
* Custom Fields Addon: Zip or Tar.gz
* Site Admin » Admin Options » Modules » Extra Data » Custom Fields
bsides 20. Jan 2006 21:54 (CET)
[bearbeiten] not in application
What does "not in aplication" means? It gives me when I click on a image! Thanks.
[bearbeiten] Strange error - did not work
- I have installed gallery2 on my mediawiki 1.5.6 and loaded your extension.
- I get the edit bar icon all right.
- When I clicked on it the enlarged figure supposed to appear on the left-pane also appears.
- However
- When I double click on the image on the left, I get the following error.
Fatal error: Call to a member function on a non-object in /usr/local/mediawiki-1.5.6/extensions/gallery2wiki_extension/classes/gallery2wiki.class.php on line 448
- After that this error appears on the left pane.
Appreciate if you can provide some clue as to what is wrong. Pcwulf 14. Feb 2006 07:33 (CET)
[bearbeiten] Problem found (and the solution)
The release candidate 2.1 of gallery 2 does not work with this extension! I will update the article to reflect this. Pcwulf 16. Feb 2006 09:59 (CET)
[bearbeiten] No Gallery2 icon in WYSIWYG editor
Been working with MediaWiki 1.5 and Gallery2.0 and can not for the life of me get the icon to showup in the editor However, if I put a foto:# tag into the editor it will come up with an error referring to galler2wiki plugin. here is the error
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/u2/jasonmch/html/extensions/gallery2wiki_extension/classes/gallery2wiki.class.php on line 185
Any Ideas???
[bearbeiten] Help
I get the following:
Warning: requireonce(modules/core/classes/helpers/GalleryDerivativeHelper_medium.class): failed to open stream: No such file or directory in /home/duey/public_html/gallery2/modules/core/classes/GalleryCoreApi.class on line 2505
Fatal error: requireonce(): Failed opening required 'modules/core/classes/helpers/GalleryDerivativeHelper_medium.class' (include_path='./:/php/includes:/usr/local/lib/php:/usr/lib/php:') in /home/duey/public_html/gallery2/modules/core/classes/GalleryCoreApi.class on line 2505
Any Ideas?
[bearbeiten] Javascript clash with GoogleMaps.php
Definite clash. But what is the cause??? Javascript? Or is it the roblem that i have not yet got the paths fixed to get the extension working with mediaWiki without the GoogleMap extensio - see below)?
They are both great extensions - pitty I cant get them working toether!
installing Gallery2Wiki and [Maps Extension] results in a javascript error for the the Google Maps Extension - ie any page with an installed Map.
This is the error you get (example page):
%%BEGINJAVASCRIPTc73ecb6178fea1843a5ad1d5b1126694838eec99b0051c1f18594cd49d56119f%% function createMarker(point, label) { var marker = new GMarker(point); GEvent.addListener(marker, 'click', function() { marker.openInfoWindowHtml(label); }); return marker; } function addLoadEvent(func) { var oldonload = window.onload; if (typeof oldonload == 'function') { window.onload = function() { oldonload(); func(); }; } else { window.onload = func; } } window.unload = GUnload;%%ENDJAVASCRIPTc73ecb6178fea1843a5ad1d5b1126694838eec99b0051c1f18594cd49d56119f%%
[bearbeiten] Paths when using subdomains
I am trying and having problems installing Gallery2wiki with a MediaWiki / Gallery2 setup which uses subdomains for each instalation (on the same server). help regarding the correct path set up for gallery2wiki_settings.php
My set up consists of two directories for each subdomain. Both dirctories reside in my $HOME directy - so it looks like this:
-- $HOME
|
|
---- wiki.architex.tv
|
|
---- image.architex.tv
main.php and the rest of the MediaWiki installation are within the $HOME/wiki.architex.tv/ folder so that the
# absolute path to this folder # $gallerySettings["absherepath"] = $_SERVER["DOCUMENT_ROOT"].$gallerySettings["herepath"];
$gallerySettings["FullDomain"] = "http://wiki.architex.tv";
# relative path to gallery2. in multisite this lead to the visible part not to the core files # # $gallerySettings["galleryRelPath"] = "/g/"; $gallerySettings["galleryRelPath"] = "/";
# absolute path to the visible multisite part # # $gallerySettings["path"] = $_SERVER["DOCUMENT_ROOT"].$gallerySettings["galleryRelPath"]; $gallerySettings["path"] = "/home/fortyfoxes/image.architex.tv/";
$gallerySettings["codepath"] = "/var/www/app-enabled/gallery2/";
$gallerySettings["galleryFullUrl"] = "http://image.archtex.tv/main.php"; # # $gallerySettings["galleryFullUrl"] = $gallerySettings["FullDomain"].$gallerySettings["galleryRelPath"]."main.php";
[bearbeiten] Clash with Google Maps Extension: a fix
As others have reported, Gallery2wiki is currently incompatible with Google Maps Extension. To fix this issue, please modify the source of gallery2wiki.php, adding "return true;" to the end of insertEditGallery2. The problem is that hooks must return true to allow other hooks to run:
http://www.mediawiki.org/wiki/Manual:MediaWiki_hooks
Thanks! --Emiller 05:44, 24. Okt 2006 (CEST)
[bearbeiten] A few things
- I'm seeing the same problem with size as mentioned above (if i specify size it just shows a red link with the number rather than the image)
- I added $gallerySettings["embedUri"] = '/index.php' ; to the gallery2wiki.settings.php and in classes/gallery2wiki.class.php's GalleryEmbed::init, changed the embedUri to point to this value. In the copy I downloaded, it was referring to a hard-coded path, "/w/index.php". I left g2Uri pointed at galleryFullUrl. This seemed to work for my setup, where I have two different document roots for wiki and gallery2, each with a different domain.
- Because of having two different document roots, I also had to comment out the 'path' setting and enter the full path for gallery2, since it's not in the same document root as the wiki. I set codepath to the same full path to gallery2.
- I was also having trouble with the showurl and showdetails settings; For these I had to change them to new values that used galleryFullUrl, because otherwise they were referring to the wiki's server rather than the gallery's.
$gallerySettings["showurl"] = $gallerySettings["galleryFullUrl"] . "?g2_view=core:DownloadItem&g2_itemId="; $gallerySettings["showdetails"] = $gallerySettings["galleryFullUrl"] . "?g2_view=core:ShowItem&g2_itemId=";
- in g2dirgroup.php, I found a spot where 'Foto' is hard coded rather than referring to the $gallerySettings["pattern"];. That should be fixed, if it isn't already (just in case you want something other than Foto: :)
If these were already fixed and I just ended up with an old copy of gallery2wiki, I apologize in advance. :)
Peepe 06:30, 11. Nov 2006 (CET)
[bearbeiten] Gallery 2.2 and MediaWiki 1.8.2
We'll soon be upgrading http://codex.gallery2.org/ to mediawiki 1.8.2. In the process I also updated to the current gallery2wiki release (2006-05-15). I made these changes to get things working again on our setup. Some changes are for working with Gallery 2.2, others are just cleanup. I don't think any changes were needed for mediawiki 1.8.2.
--Mindless 23:00, 27. Dez 2006 (CET)
[bearbeiten] Don't require customfield module
Here is a patch so having customfield module is not required (as mentioned above.. http://www.transarte.net/mediawiki/index.php/Diskussion:Gallery2wiki#Error.2C_have_you_got_this.3F ).
--- extensions/gallery2wiki_extension/classes/gallery2wiki.class.php (revision 956)
+++ extensions/gallery2wiki_extension/classes/gallery2wiki.class.php (working copy)
@@ -490,8 +490,6 @@
GalleryCoreApi::requireOnce('modules/core/classes/helpers/GalleryDerivativeHelper_simple.class');
- GalleryCoreApi::requireOnce('modules/customfield/classes/CustomFieldInterface_1_0.class');
- GalleryCoreApi::requireOnce('modules/customfield/classes/CustomFieldHelper.class');
//** end from gallery embed.php / class ...
// i use some functions from GalleryDerivativeHelper_medium.class
return ( false );
@@ -528,8 +526,19 @@
* this is just an abstration of the related gallery2 function
*/
function g2extraFields($itemObj){
- list($ret, $additionalFields ) = CustomFieldHelper::fetchFieldValues($itemObj);
- return $additionalFields;
+ static $customFieldHelper;
+ if (!isset($customFieldHelper)) {
+ list ($ret, $customFieldInterface) =
+ GalleryCoreApi::newFactoryInstance('CustomFieldInterface_1_0');
+ if ($ret || !isset($customFieldHelper)) {
+ $customFieldHelper = false;
+ }
+ }
+ if ($customFieldHelper) {
+ /* XXX calling function not actually exposed by this interface */
+ list ($ret, $additionalFields) = $customFieldHelper->fetchFieldValues($itemObj);
+ }
+ return $additionalFields ? $additionalFields : array();
}
/**
--Mindless 20:17, 6. Mär 2007 (CET)
[bearbeiten] Problem accessing my gallery
Hi, I installed and set up gallery2wiki. I can tell it's going to be great once I get it working. But right now, I'm getting the word "leer" in the gallery picker. Source diving showed me that this means that it can't find any albums. Any guesses on why this would be?
One possible complicating factor: I'm using phpbb2 user integration in both the wiki and gallery2. However, this seems to be working fine and the account that is accessing the wiki also has cookies allowing it access to the gallery.
The gallery's permissions are normally set to allow no one but the users to view pictures. I opened up permissions on an album to "Everybody" and the word printed in picker changed to "nulleer."
Any ideas? Thanks! Twinotter 03:20, 11. Jul. 2007 (CEST)
- Progress- I determined that it is the permissions that are the problem. When I changed the permissions to allow the whole gallery (not just an album as I tried before) to be viewable by Everybody, the system worked fine. But how do I make it work without opening up the pictures to the whole world? Thx! Twinotter 03:30, 11. Jul. 2007 (CEST)
- i'm not sure about, but i guess you don't mean the rights 777 in the file systen.
- There is one argument $gallerySettings["uid"] which is normally not set. Try setting the uid to a real gallery2 user with rights to view all the needed albums.
- When you restrict gallery2 but allow just some folders:
- Try to add some pictures by hand out of this folder , finding the id in gallery2 and adding it to the wiki [ [ foto: id ] ].
- If this work, then only the tree building function got in trouble, as it walks through the whole album gagthering all folder names.
- Let me know the progress.
- You're right, I'm not talking about the unix permissions, but rather the gallery permissions. When I make the top level of my gallery only visible to my users, then the tree building function doesn't work. [[photo:id]] does work - so it only seems to be the tree that's the problem.
- I tried setting $gallerySettings["uid"] to "twinotter" - my user name and also tried setting it to "6". I found this last by exploring the gallery SQL database to find the id number that corresponded to the username. Neither allowed the gallery to be created. I'm going to try digging a little deeper to see how that uid is used...
- uid is passed right through to the GalleryEmbed class that does a lookup on the ID to see if it's the active ID. If not, it fails out. This explains why when I entered "twinotter" it aborted even sooner. But I'm still not sure how this is used to build the catalog or if it's even accessed again...
- fetchAlbumTree uses the userId of the currently active session to get the tree. It does allow you to pass in a userID, but just passing in the "6" as found the in SQL database returned permission denied...
- Thanks! Twinotter 21:46, 17. Jul. 2007 (CEST)
- As I'm facing the same problem. I would like to ask if you solved the problem. BTW. it's enough to allow evrybody the "View Item" permission. It's not necessary to allow the view of all versions.
- Regards, Afromm
[bearbeiten] Gallery 2.2 and MediaWiki 1.10.1
Hi again.. great to see the patches from the Gallery2 team integrated into this latest release, thanks! I have merged the gallery22wiki110 release into our codebase for http://codex.gallery2.org/. I have prepared diffs for 3 more small changes:
- insertEditGallery2 put javascript in strange places because it added the text the first time it was called (whatever text that may be for). Refactored to simplify this with an AlternateEdit hook.
- Fix positioning of size controls when image is not on left margin.
- Remove around image (that was inside a ), put $cls on the span.
--Mindless 21:08, 18. Jul. 2007 (CEST)
[bearbeiten] Gallery22 + Mediawiki 1.11.0 + tinyMCE 2.1.2
Hello, I'm trying to get Gallery2Wiki running and stumbled over several problems i was able to solve. But now, I've come across a hard one.
The environment is as follows: MacOS 10.4.10 MAMP 1.7, PHP5 Mozilla Firefox 2.0.0.8 Gallery2.2 Mediawiki 1.11.0
After Installation of Gallery22, Mediawiki 1.11.0 and the tinyMCE 2.1.2 plugin the wiki produced an error and was unfunctional. With the three changes of "Mindless" my mediawiki was alive again. Even better, the gallery2wiki icon got displayed and the navigation on the left changed as it should. But when i wanted to insert an image and therefore clicked on it, i got the following error:
Fehler: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLTextAreaElement.selectionStart]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost:8888/wiki/skins/common/wikibits.js?97 :: mwSetupToolbar :: line 380" data: no] Quelldatei: http://localhost:8888/wiki/skins/common/wikibits.js?97 Zeile: 380
By uncommenting the tinyMCE plugin I get gallery2wiki to work. Though it is a high price not to have tinyMCE. Does anyone have an idea, why they don't want to go along with each other? Would there be any chance to integrate gallery2wiki into tinyMCE? The latter seems pretty flexible. However i don't see through the processes of gallery2wiki yet.
Any ideas and comments are highly welcome. Thank you, best rap
[bearbeiten] Gallery2.2.4 + Mediawiki 1.12.0
Liebe Nutzer,
ich möchte gerne ein Wiki mit CC-Fotogallerien einrichten. Kann mir jemand helfen, ich habe die Installation wie hier beschrieben durchgeführt. die Mediawiki Hauptseite läßt sich nicht öffnen (vorher funktionsfähig), Gallery2 vorher und nacher funktionsfähig. Kann mir jemand helfen e-mail: GeorgKirsten@web.de
Verzeichnisselokale Festplatte (Testumgebung)
D:/XAMPP/htdocs/wikimedia-1.12.0
D:/XAMPP/htdocs/gallery2
phpMy-Admin 2.11.3
MySQL 5.0.51
Gallery 2.2.4
absoluter Pfad Webhoster All-Incl.
/www/htdocs/w008gd78/
Domain: http://www.georgsfotoseite.de
Ordner Bilder
Gallery2
Mediawiki
gallery2wiki.settings.php
...
$gallerySettings["herepath"] = "/mediawiki-1.12.0/extensions/gallery2wiki_extension/"; //
relative path to this folder;
$gallerySettings["absherepath"] = $_SERVER["DOCUMENT_ROOT"].$gallerySettings["herepath"];
$gallerySettings["FullDomain"] = "http://localhost/";
$gallerySettings["galleryRelPath"] = "/gallery2/";
$gallerySettings["path"] = $_SERVER["DOCUMENT_ROOT"].$gallerySettings["galleryRelPath"];
//$gallerySettings["codepath"] = "/var/www/app-enabled/gallery2/";
//$gallerySettings["codepath"] = $gallerySettings["path"];
$gallerySettings["codepath"] = $_SERVER["DOCUMENT_ROOT"].$gallerySettings["galleryRelPath"];
$gallerySettings["galleryFullUrl"] = $gallerySettings["FullDomain"].$gallerySettings
["galleryRelPath"]."main.php";
Localsettings.php...
$wgEnableUploads = true;- $wgUseImageMagick = true;
- $wgImageMagickConvertCommand = "/usr/bin/convert";
...
$wgDiff3 = "";$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
require_once("extensions/gallery2wiki_extension/gallery2wiki.php");
es funktioniert lediglich der Test
"http://www.test.ch/mediawiki/extensions/gallery2wiki_extension/g2dirgroup.php"
[bearbeiten] Resolved - Internal Error - Detected bug in an extension! Hook replaceR failed...
Despite being married to a German woman, I'm sorry to say that I cannot speak/read German (yet). I also have almost no PHP programming experience so attempting to debug problems is not a strength. However I have run into a problem with the Gallery2wiki extension that I have been able to resolve. Hopefully passing on this information can help somebody else in the future!
I'm running the following:
[bearbeiten] Problem
After enabling the Gallery2wiki extension I received almost the exact same error that Gilrim documented on Tue, 2007-09-18 15:46 here:
Internal error Detected bug in an extension! Hook replaceR failed to return a value; should return true to continue hook processing or false to abort. Backtrace: #0 /home/cristobal/www/includes/Parser.php(303): wfRunHooks('ParserBeforeStr...', Array) #1 /home/cristobal/www/includes/Article.php(3017): Parser->parse(''''etellerannet...', Object(Title), Object(ParserOptions), true, true, 4) #2 /home/cristobal/www/includes/Article.php(831): Article->outputWikiText(''''etellerannet...') #3 /home/cristobal/www/includes/Wiki.php(383): Article->view() #4 /home/cristobal/www/includes/Wiki.php(48): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest)) #5 /home/cristobal/www/index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest)) #6 {main}However, I noticed that
mediawiki/extensions/gallery2wiki_extension/g2dirgroup.phpwas operational, and it appeared as though Gallery2wiki was working?[bearbeiten] Solution
I modified the
mediawiki/extensions/gallery2wiki_extension/gallery2wiki.phpfile.I added
return true;
to the replaceR function on (approximately) line #103.
Thus the new replaceR function now should look something like:
function replaceR($article, &$text){ global $gallerySettings; static $once=0; // remove all {{:Foto:xxx}} //$text = "+++" . str_replace("{{:Foto:", "__MAGIC_REMOVE__{{:Foto:", $text); $text = preg_replace("/\{\{:" . $gallerySettings["pattern"] . ":(\d+)\}\}/iU", "{{:" . $gallerySettings["pattern"] . ":$1}}" , $text ); // remove all
$text = preg_replace("/\[\[" . $gallerySettings["pattern"] . ":(.*)\]\]/iU", "
" , $text ); return true; // added to resolve Hook replaceR failed error. }
Possibly this 'hack' is not appropriate, but it seems to have worked for me.
Thank you very much! Your anwer was very helpful! Georg[bearbeiten] Does Gallery2Wiki work with Gallery 2.3 and Wiki 1.15.4
Please forgive me Andres, my minimal German is atrocious, so I must use English.
QUESTION 1: Is Gallery2Wiki compatible with Gallery 2.3 and Wiki 1.15.4?
I have installations of each in place and working on a Linux Server running php5.2.8 and MySQL 4.1.24.I have downloaded and uncompressed the http://www.transarte.net/mediawiki/extensions/gallery22wiki110_extension.tgz file and put it in the proper position.
I have inserted the appropriate require_once("extensions/gallery2wiki_extension/gallery2wiki.php"); line in my LocalSettings.php file, and I have inserted the various path statements in the /mediawiki/extensions/gallery2wiki_extension/gallery2wiki.settings.php (however it was not clear to me WHERE exactly I was supposed to place the statements in the file--hence QUESTION 2 below.)
QUESTION 2 WHERE do we fill in these variables in the gallery2wiki.settings.php file? I see they are already floating in commented lines just after the if(isset($_REQUEST["gallerySettings"])){ echo "hack attempt"; exit;} line, BUT I see that they exist in individual statements inside a conditional statement below. -- I tried several locations, see FOLLOWUP below.
//*** settings
$gallerySettings["herepath"] = "/mediawiki/extensions/gallery2wiki_extension/"; // relative path to this folder;
$gallerySettings["absherepath"] = $_SERVER["DOCUMENT_ROOT"].$gallerySettings["herepath"];
$gallerySettings["FullDomain"] = $_SERVER["HTTP_HOST"];
$gallerySettings["galleryRelPath"] = "/gallery2/";
$gallerySettings["path"] = $_SERVER["DOCUMENT_ROOT"].$gallerySettings["galleryRelPath"];
$gallerySettings["codepath"] = "/var/www/.../web/gallery2/";
$gallerySettings["galleryFullUrl"] = $gallerySettings["FullDomain"].$gallerySettings["galleryRelPath"]."main.php";
Based on the above code snippet,
QUESTION 3 Am I correct to assume that I insert my path to the MediaWiki home directory relative to the webroot into the "herepath" ?
QUESTION 4 Am I correct to assume that the "absherepath", and "FullDomain" are calculated by your code using the Server variables and the "herepath"?
QUESTION 5 Am I correct to assume that I insert my path to the Gallery2 home directory relative to the webroot into the "galleryRelPath" ?
QUESTION 6 Am I correct to assume that the "path" is calculated by your code using the Server variables and the the other variables just set?
QUESTION 7 Am I correct to assume that the "codepath" is hard coded to the absolute path on the server to the gallery2 hone directory?
QUESTION 8 Am I correct to assume that the "galleryFullUrl" is calculated based on variables as set above?
IN OTHER WORDS, we are to fill in three variables: "herepath", "galleryRelPath", and "codepath"?
I am really hoping this works, If so, I plan to use Gallery2 as the image management tool across numerous platforms on my site (Drupal, MediaWiki, Wordpress, Zen Cart.) But, will only try to synchronize the user base between Wiki and Gallery, as the collaboration repositories, until such time as I find a worthwhile SSO package (that the hosting provider will allow) to wrap around the whole Installation.Sorry so long winded...I realize its a lot of words to ask a couple simple questions...just wanted to be clear.
Danke, Danke, Danke,
Onehorse
FOLLOWUP: I followed the directions with the understanding above...I tried placing the Path statements at several different locations and in all cases I get an error message:
MediaWiki internal error.
Exception caught inside exception handler
