41
xgarb
Re: xoops renaming uploads
  • 2008/6/8 15:34

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


you can change the filenames XOOPS saves images with.

See class/uploader.php for options here...

if (isset($this->targetFileName)) {
            
$this->savedFileName $this->targetFileName;
        } elseif (isset(
$this->prefix)) {
            
$this->savedFileName uniqid($this->prefix).'.'.strtolower($matched[1]);
        } else {
            
$this->savedFileName strtolower($this->mediaName);
        }


use it something like this...

$uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif''image/jpeg''image/pjpeg''image/x-png''image/png'), $imgcat->getVar('imgcat_maxsize'), $imgcat->getVar('imgcat_maxwidth'), $imgcat->getVar('imgcat_maxheight'));
    
$uploadedFilename $_FILES['image_file']['name'];
    
$uploader->setTargetFileName('myprefix_'.$uploadedFilename);    
    if (
$uploader->fetchMedia($xoops_upload_file[0])) {
        if (!
$uploader->upload()) {
            
$err $uploader->getErrors();


but you really should introduce a random element somewhere as well in case someone finds a way to upload a unsafe file.. makes it harder for them to find it on the server. I think the current system is there to prevent users over-writing each others files so you may want to keep that in mind as well.



42
xgarb
Re: Trojan on site!
  • 2008/5/28 17:32

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


it's actually some javascript that has been inserted into the homepage probably by exploiting some other vulnerabilty on the server, possibly through someone else's account on the server. This javascript pulls nasty stuff from other sites.

I would not recommend going to have a look!



43
xgarb
Re: Best IDE for XOOPs development
  • 2008/5/19 20:20

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


Just starting to look into this myself as Dreamweaver doesn't really cut it with more complicated systems like Xoops.

Anyone else have good experiences with an IDE?

I've just started looking at them, so far have briefly tried PDT (PHP Eclipse) which seems good so far.. liked being able to click a function name and see where it was declared. Quickly looked at Zend Studio and the debugging and code hints are really good.

I would like a system that works with the code on the server or tests against the code on the server with a temporary file (bit like preview in browser in Dreamweaver), steps through the code showing debug and browser window results (Zend does this), shows the function code on mouse-over the name (PDT does this). One that can cope with Smarty and PHP would be good as well.

If anyone is using text editors to work with XOOPS I would suggest looking at this stuff.. no more pasting echo or print_r() statements everywhere to see where the code is failing or what its outputting.

I'm new to IDEs so still finding my feet with them!



44
xgarb
Re: Xoops Licence Keys - Over a mild coffee :-)
  • 2008/5/8 8:48

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


I suppose that someone needs to think about who XOOPS is aimed at. I worry that making it too simple could affect the flexibility of the system.

Most users at the moment I imagine are web developers who set it up for themselves or someone else, maybe add a few hacks and even their own custom modules. Personally I think the system is to complex for those looking for a one button install and maybe those people would be better with Wordpress or phpBB rather than the framework that XOOPs is.

I might just be thinking about my own needs here of course.

(I like the idea of a control panel where you can see if the core or modules need updating. Especially if this is for security updates but maybe this could be done with RSS?)



45
xgarb
Re: adding comment system to a module!!!
  • 2008/5/3 12:09

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


Found out what was wrong with my attempt at adding comments..

If you declare the template like this..

$tpl->display( "db:{$mydirname}templatename.html" )

comments don't work.

I guess the newer way which works is...

$xoopsOption['template_main'] = 'templatename.html';



46
xgarb
Re: adding comment system to a module!!!
  • 2008/4/26 21:55

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


this might help..

http://web.archive.org/web/2006113011 ... i/index.php/Commentsystem

Not working for me at the moment but the other modules have this system so probably something I'm doing wrong.



47
xgarb
Re: Xoops test/info page for users.
  • 2008/4/26 18:21

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


ah brilliant! Found it.. http://dave-l.com/grafix/index.php?page=bcheck

exactly what I wanted. Thanks Hervet and Dave.

Something like this would be good in the core, like a mini test suite for admins and users to check local and server environments.



48
xgarb
Xoops test/info page for users.
  • 2008/4/23 11:11

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


Am thinking that XOOPS could do with a test page that a user can go to if they are having problems accessing a feature of the site.

This page would run some tests and shows results to the user. These results could be pasted into a support request.

Similar to these .. http://gemal.dk/browserspy/basic.html but XOOPS specific items such as writing/reading session cookies, referrer information received etc.

Sometimes I get a user who can't log in from home but work is ok and this could show where the problem might be.

Which things would need to be checked?



49
xgarb
Re: URGENT: Can't log in under any name
  • 2008/4/23 10:47

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


Quote:

barryc wrote:
If anyone has any suggestions to avoid that rather mammoth task, please tell me what they are.


Use the group management part of the admin area. If you choose a group and scroll down there's a button to add users to group.

You probably want to add all active users to the registered users group.



50
xgarb
Re: Hiding blocks for one usergroup
  • 2008/4/20 11:35

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


last part for Third Eye should be this..

---------------------

to remove subscribers from group id 4 (so they don't see adverts) I added the following line to the end of the addUserSubscription in include/functions.php in the subscription module from Third Eye.


$deletesql "DELETE FROM " XOOPS_DB_PREFIX "_groups_users_link WHERE groupid = 4 AND uid = $uid"// my hack to remove subscriber from basic member group
mysql_query($deletesql$db);




TopTop
« 1 2 3 4 (5) 6 7 8 ... 14 »



Login

Username:
Password:

Lost Password? Register now!

Who's Online

56 user(s) are online (26 user(s) are browsing Support Forums)


Members: 0


Guests: 56


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