293041
malexandria
Re: desperately need help tracking and banning trolls.

Can't you just use the built in Ban IP function to effectively block folks?



293042
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.



293043
netwize
Re: desperately need help tracking and banning trolls.
  • 2003/6/1 10:25

  • netwize

  • Just popping in

  • Posts: 89

  • Since: 2002/1/20


bump



293044
Gynther
Re: Polish your theme CSS files
  • 2003/5/31 14:25

  • Gynther

  • Just popping in

  • Posts: 8

  • Since: 2003/5/21


Making webpages look good cross-platform can be nightmare. I usually try and fix it with a little help from PHP and include a separate CSS file depending on which browser is used. This helps, me at least , to organize my stylesheets better. I make a version for each browser I wish to support and that does not comply with eachother and insert the following PHP code snippet:

if(strstr($HTTP_USER_AGENT, "Mozilla")){$user_agent = "Mozilla";}
if(strstr($HTTP_USER_AGENT, "Konqueror")){$user_agent = "Konqueror";}
if(strstr($HTTP_USER_AGENT, "IE")){$user_agent = "IE";}


and

echo("\n");

into the .php file. This way of course doesn't work if the user chooses to mask his/her browser as anotherone but that is more or less out of ones control. This also means that the CSS files have to be named like for instance "stylesheet_Mozilla".

Oh, and thanks sunsnapper for the tip about sizes. I was looking for that somewhere.



293045
jad2000
Re: Main Menu
  • 2003/5/31 12:17

  • jad2000

  • Just popping in

  • Posts: 16

  • Since: 2003/4/12


What am I pupposed to add?



293046
frizzo
Re: Help making admin look like rest of site
  • 2003/5/30 22:26

  • frizzo

  • Just popping in

  • Posts: 4

  • Since: 2003/3/18


Yes,

I think you're right, it's coming along pretty quickly. So nice when things come together like this, it means the original product was well-designed.

Another Q:

I set up another menu item under News and called it admin, linking it to admin.php.

How do I set it up so the link does not show up unless one is logged in with permissions to access the admin page?

I think this is possible in postnuke, hoping it's possible with XOOPS!

Thanks b'zillions

~frizzo



293047
ackbarr
Re: Help making admin look like rest of site

I have not tried to do this...but my assumption is that it would be easier to add the admin functions to the regular layout. AFAIK the admin panel does not use smarty templates at all - so making it parse the current theme.html would be a definite stumbling block.



293048
frizzo
Help making admin look like rest of site
  • 2003/5/30 21:21

  • frizzo

  • Just popping in

  • Posts: 4

  • Since: 2003/3/18


Hi,

I need to make the news admin match the layout of the rest of the site .. the journalism dept at my uni will be using XOOPS and they would freak out if they go to edit articles and it kicks into the default mode .. so i want to take the edit/approve article functionality out of the admin area and put it into the regular news module.

I'm wondering if anyone has done this and could offer some advice -- is it easier to port the admin news features to the regular layout, or to go the other way around, and just port the layout to the admin area? It's a pretty general question at this point, but what aspects of the admin section need to be ported over other than the obvious?

Additionally it would be nice if there is a way to handle this in several modules!!

Is there an easy way to do this? It looks kind of involved!!

Thanks for any help

~frizzo



293049
techgnome
Re: "Whats new since last logon" module needed
  • 2003/5/29 13:21

  • techgnome

  • Module Developer

  • Posts: 51

  • Since: 2002/8/9 5


You asked for it, now you have it. The hack has been posted in the "Modules / Themes" section on Xoops.
The direct link to the Zip file is: https://xoops.org/modules/mydownloads/visit.php?lid=418
The direct link to the gzip/tar file is:
https://xoops.org/modules/mydownloads/visit.php?lid=419



293050
techgnome
Re: "Whats new since last logon" module needed
  • 2003/5/29 4:44

  • techgnome

  • Module Developer

  • Posts: 51

  • Since: 2002/8/9 5


Just want to let those following this thread that the hack is now available in the D/L section (well, it was submitted.... it may be a day or two before it actually shows up). If any one needs/wants it direct, contact my self via email, or ScoobRS. Either one of us should be able to get it to you.

In the near future, I plan to hopefully develop it a bit more to search out more items, as it now only does the forums. If it grows enough, I might be convinced enough to develop a full-fledged module that can do this kind of searching for the whole site dynamically.







Login

Who's Online

525 user(s) are online (330 user(s) are browsing Support Forums)


Members: 0


Guests: 525


more...

Donat-O-Meter

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

Latest GitHub Commits