21
SirTanksAlot
Re: Main Menu

In the template for system_block_mainmenu.html after the line:
<!-- end module menu loop -->

Add the following..
<!-- Add a static menu entry -->
<a class="menuMain" href="{LINK}">{DESCRIPTION}</a>

Wash, Rinse, Repeat...


If you are linking to something, under XOOPS you can do something like the following..
<{$xoops_url}>/modules/cjaycontent/index.php?id=2

The only downside of this is that it doesn't "mix" w/ your other entries in the menu...



22
SirTanksAlot
Re: Xoops Gallery

You are correct sir.. I fubar'd the link too..

http://www.shirel.com/modules/mydownloads/



23
SirTanksAlot
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...

Sorry I had granted anonymous, et.al. access to the blocks.. but missed the module...

I guess that's what I get for not being able to sleep and doing all of the posting on 36+hrs of no sleep...

It should be fixed now.. Sorry for the messup..



24
SirTanksAlot
XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...

I just finished a bunch of hacking on XoopsGallery...

you can get my changes from: http://www.shirel.com/modules/mydownloads

Following is the contents of the change.txt for everything that I did...

Matt's Gallery Hacks
mls-at-shirel.com

If you have any questions, email me and I'll do my best to help... I'm a php newbie,
and I know even less SQL.. But I hack my way through as best I can... btw -- Some "Bugs"
could possibly considered "features".. but I wanted different behavior...

June 1, 2003

Bug: Album Description do not show up on top level page that lists each of the albums...
Reason: Typo of smarty template
Fix: In the template file: xoopsgallery_index.html change the smarty-template name on line 27:
from: <{$album.desc}>
to: <{$album.album_desc}>
Note: Your template files (stored in the DB) will have to be refreshed for this change to go
into affect.

Bug: The sort function bombed for anything other than a random sort.
Reason: the album save() function is not reenterant.
Fix: Modified classes/album.php and sort_album.php.
The function -- SortPhotos() -- now takes a 3rd argument. This arguement defaults to false
meaning it will execute a save() in the middle of the function. When called from sort_album,
the 3rd arguent is passed as try to bypass the save since one will be done upon exiting the
function call.

Bug: New Pictures Block displays full size images instead of the thumbnail image.
Reason: B/c that's the source that was being passed... the block needed more/better info...
Fix: Modified class/image.php and blocks/xoopsgallery_blocks.php
image.php: Added new functions to the XoopsgalleryImage() class to put together a thumbnail link.
xoopsgallery_blocks.php: call the new function (getFullThumbURL) instead of the old (getFullURL)

Bug: New Picture Block would display less than the desired number of pictures if they movies/albums/etc
were a part of the list...
Reason: Only N items were pulled out of the MySQL tables...
Fix: Modified class/image.php and blocks/xoopsgallery_blocks.php
image.php: Added new functions to the XoopsgalleryImage() class.
xoopsgallery_blocks.php: pull some more entries from the table and make sure there is a
thumbnail for all the ones you are going to use...

Bug: Random Image Block would not provide a link to the image/gallery the image originated from...
Reason: b/c that's the way it was written..
Fix: modified class/image.php, blocks/xoopsgallery_blocks.php and
templates/blocks/xoopsgallery_block_rand.html
image.php: this depends upon the modification for the "New Pictures Block" hacks
xoopsgallery_blocks.php: Completely rewrote the function -- b_xoopsgallery_getRandomImage()
It now more closely resembles the b_xoopsgallery_newshow() function.
xoopsgallery_block_rand.html: This now exactly mimics the new picture block template...
* Note: make sure you refresh your template files for this block...

Bug: The Recent Comments block does not reliably link to the image/comments w/i a gallery. It
frequently throws and error about undefined object (or something similar) and returns a blank page.
Reason: The link from Recent Comments passes the albumName as albumName=XXX instead of set_albumName=XXXX.
Fix: ************* HACK *************************
This should really be fixed in the comments block code.. but I wasn't going to start my way through
that learning curve tonight... So I did the following as a major hack:
Modified session.php
Now, instead of just looking for set_albumName to be passed as a GET param, it will also look
for albumName...

NOTE: The sporatic success/failures seems to be b/c an Album object is carried around in the session
after you have visited any albums. If the last album visited happened to be the same one as the
comment went to, you were in luck and everything worked. If it was a different album, you would
end up on the wrong image.


WHEW!!!!!!! I think that's it...

ToDo: Sometime in the future, when I (or someone) has the time to figure out how to do it...

1) Count the total number of new Images added in the last week/month/??? and include in new image block.
1a) Page/Block to show list (thumbnail) of all images added in last week/month/???
2) Add block configuration options for the Random Image block... How many? Size? Show Upload Date?
2a) Add option to new image block to configure timeframe of 1/1a.
3) Add notifications when new images are added to an album.
4) Exclude "private" images from new/random blocks.



25
SirTanksAlot
Re: Enhancing the built in editor

Just wanted to chime in that I'd be very interested in the final result and would be willing to help as much as I can...

Just a thought, I know that Catzwolf has done a good deal of work to integrate a WYSIWYG editor into his WFSections module.. he might be a good reference point to start w/ for something like this.



26
SirTanksAlot
Re: XoopsGallery Sorting Fix

Initially, I made a bunch of changes trying to track the problem down.. I finally came to this simplification.


Comment out line 223 in album.php..

for some reason, it doesn't like 2 saves on the album... The first would seem to go through ok.. but the second would always fail. by commenting out line 223 and only doing the save after outside that function call, everything else seemed to work ok...



27
SirTanksAlot
Re: MassMail to members [fixed]

I'm a little bit confused here.. So please allow me to ask for some clarification.

1) This feature broke for me after I upgraded from Xoops2RC2 to Xoops2RC3. Is this the pattern that this thread is responding to?

2) If so, are the changes to fix this issue isolated to {xoops_dir}/modules/system/admin/mailusers/mailusers.php?

3) Should I be able to update that single file (or folder: mailusers) to patch my site?

I hope that my questions make sense, TIA for the clarification...




28
SirTanksAlot
XoopsGallery Sorting Fix

I'm not exactly sure what the correct mechanism is for submitting a hack/fix to this module.. but here goes..

The module wouldn't sort the images in the album correctly.. here are the diffs (visual source safe style) for the changes I made to classes/album.php and sort_album.php

If you want them in a different format.. please let me know..

Thanks

HACK:

album.php
211    Ins:         return $this->save();
220    Ins:         
223 Change:         $this->save();
        
To:         // Don't save yet.. wait until the rest is finished as well..
224 Change
        
To:         //$this->save();
227    Ins:         
306    Ins:         return $this->save();
450 Change
        
To:         
505 Change:             if ($fd fs_fopen($gallery->app->albumDir "/serial.dat""w"
        
To:             $serial2 $gallery->app->albumDir "/serial.dat";
510    Ins:             if ($fd fs_fopen($serial2"w")) {


sort_album.php
46 Change:     if ($confirm) {
        To:     if ($sort) {
 49 Change:             $gallery->album->save();
        To:             //$gallery->album->save();
 54 Change:             $gallery->album->save();
        To:             //echo $gallery->album->save();
 77 Change: <?php echo makeFormIntro("sort_album.php"); ?>
        To: <?php echo makeFormIntro("sort_album.php"
 
78    Ins:             array("name" => "theform"
 
79    Ins:                 "method" => "POST")); ?>
110 Change: <input type=submit name=confirm value="Sort">
        To: <input type=hidden name="confirm" value="Sort"/>
113    Ins: <input type=submit name="submit" value="Sort"/>



29
SirTanksAlot
Re: xoopsGallery 1.3.3 Problem.. I think I am an idiot cuz everyone else seems to get it to work

<WARNING> I speak w/ only partial understanding... </WARNING>

V2 implements a page caching scheme (related to the smarty templating.. I think) to enhance performance. The general preference settings specify settings for a "Module-Wide" cache. (I think there are other places that cache times can be specified as well.. blocks, etc, ???) In my case, I had set the cache time for the gallery mod to 1 day (or something similar). This resulted in my newly created albums not showing up when I returned to the gallery main page. Once I turned off caching for the module (or if I had waited for the cached value to expire), the albums appeared.

As another thought... have you tried turning on debug mode in the gallery module? have you tried the various general debug modes available in the general site preferences menu?

either or both of those might give you some more useful information as to what is happening...

hth



30
SirTanksAlot
Re: xoopsGallery 1.3.3 Problem.. I think I am an idiot cuz everyone else seems to get it to work

If you are getting the "lock file" error, I think you need to turn off the use use of "flock". I'm going off of memory, but its the 3 or 4 option from the end of the list of gallery peferences in the admin section..

btw -- I also ran into a fun problem of creating albums (w/o errors) and then not being able to see them... This was b/c I had turned on caching for the gallery module... I turned it off while I was doing my initial setup and I didn't loose nearly as much hair... :)




TopTop
« 1 2 (3)



Login

Who's Online

153 user(s) are online (88 user(s) are browsing Support Forums)


Members: 0


Guests: 153


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits