234461
kiwiguy
Re: How to get Xoogle key?
  • 2004/9/26 14:03

  • kiwiguy

  • Friend of XOOPS

  • Posts: 295

  • Since: 2004/4/19


Thanks jason quite correct you are Just installed that module now that I know that. Thanks for that info jason



234462
Jackwan
Re: IStat not updating!
  • 2004/9/26 13:26

  • Jackwan

  • Not too shy to talk

  • Posts: 129

  • Since: 2004/9/8 2


Okay, Ok,

It is my fault. The stats are updating alright. However, I do not know how is that being done. It looks like there is a time delay and not every log on is recorded. Is there any documents explain what is going on?



234463
JMorris
Re: How to get Xoogle key?
  • 2004/9/26 13:20

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


It's also important to note that the Google API is experimental and you are limited to 1,000 searches per day. I implemented it on one of my site and it was really buggy. Sometimes the characters would come out as nonsense.

If you're just wanting to add the ability for google to search your site, just add a google search box inside a block. It's free and only takes a couple minutes. See below:

Link: Add Google to your site

Additionally, if you're an Adsense partner, you have even more options to customize your search block. The Adsense program is an excellent way to generate additional revenue through targetted advertisements, and it's free to join. Another benefit of Adsense is it gets the Google robot to spider your site more frequently since Google needs to target ads based on your content. See below:

Link: Become an Google Adsense Partner

There are several other ways of adding Google to your site without using the API. I recommend using the search function at the top right of your screen as well as checking out the module repository at Sourceforge

Hope this helps.

JMorris



234464
TheFinni
uploading two files in one form using uploader.php xoops class
  • 2004/9/26 13:19

  • TheFinni

  • Just popping in

  • Posts: 75

  • Since: 2003/11/25


Does anyone know if I can use the current XOOPS uploader file to upload two files in the same form?

I have modified Soapbox a little and would like to add an action picture as well. (i.e two pictures)

This is what I have done with my form:


// IMAGE
    // The article CAN have its own image :)
    // First, if the article's image doesn't exist, set its value to the blank file
    
if (!file_exists(XOOPS_ROOT_PATH "/" $xoopsModuleConfig['theteam_uploaddir'] . "/" $artimage) || !$artimage)
        {
        
$artimage "blank.png";
        } 
    
// Code to create the image selector
    
$graph_array = & XoopsLists :: getImgListAsArrayXOOPS_ROOT_PATH "/" $xoopsModuleConfig['theteam_uploaddir'] );
    
$artimage_select = new XoopsFormSelect'''artimage'$artimage );
    
$artimage_select -> addOptionArray$graph_array );
    
$artimage_select -> setExtra"onchange='showImgSelected("image5", "artimage", "" . $xoopsModuleConfig['theteam_uploaddir'] . "", "", "" . XOOPS_URL . "")'" );
    
$artimage_tray = new XoopsFormElementTray_AM_THETEAM_SELECT_IMG' ' );
    
$artimage_tray -> addElement$artimage_select );
    
$artimage_tray -> addElement( new XoopsFormLabel''"<br /><br /><img src='" XOOPS_URL "/" $xoopsModuleConfig['theteam_uploaddir'] . "/" $artimage "' name='image5' id='image5' alt='' />" ) );
    
$sform -> addElement$artimage_tray );

    
// Code to call the file browser to select an image to upload
    
$sform -> addElement( new XoopsFormFile_AM_THETEAM_UPLOADIMAGE'cimage'$xoopsModuleConfig['maxfilesize'] ), false );

//TN adding action image:
    
if (!file_exists(XOOPS_ROOT_PATH "/" $xoopsModuleConfig['theteam_uploaddir'] . "/" $actionimage) || !$actionimage)
        {
        
$actionimage "blank.png";
        } 
    
// Code to create the image selector
    
$graph_array = & XoopsLists :: getImgListAsArrayXOOPS_ROOT_PATH "/" $xoopsModuleConfig['theteam_uploaddir'] );
    
$actionimage_select = new XoopsFormSelect'''actionimage'$actionimage );
    
$actionimage_select -> addOptionArray$graph_array );
    
$actionimage_select -> setExtra"onchange='showImgSelected("image6", "actionimage", "" . $xoopsModuleConfig['theteam_uploaddir'] . "", "", "" . XOOPS_URL . "")'" );
    
$actionimage_tray = new XoopsFormElementTray('Select action image''&nbsp;' );
    
$actionimage_tray -> addElement$actionimage_select );
    
$actionimage_tray -> addElement( new XoopsFormLabel''"<br /><br /><img src='" XOOPS_URL "/" $xoopsModuleConfig['theteam_uploaddir'] . "/" $actionimage "' name='image6' id='image6' alt='' />" ) );
    
$sform -> addElement$actionimage_tray );
    
// Code to call the file browser to select an image to upload
    
$sform -> addElement( new XoopsFormFile('Upload action image''dimage'$xoopsModuleConfig['maxfilesize'] ), false );
//TN EOF action image


and then I tried to modify the function to my action image:

// ARTICLE IMAGE
        // Define variables
        
$error 0;
        
$word null;
        
$uid $xoopsUser -> uid();
        
$submit 1;
        
$date time();

        if ( 
$HTTP_POST_FILES['cimage']['name'] != "" )
            {
            include_once 
XOOPS_ROOT_PATH '/class/uploader.php';

            if ( 
file_existsXOOPS_ROOT_PATH "/" $xoopsModuleConfig['theteam_uploaddir'] . "/" $HTTP_POST_FILES['cimage']['name'] ) )
                {
                
redirect_header"index.php"1_AM_THETEAM_FILEEXISTS );
                } 
            
$allowed_mimetypes = array( 'image/gif''image/jpeg''image/pjpeg''image/x-png' );

            
uploading($allowed_mimetypes$HTTP_POST_FILES['cimage']['name'], "index.php"0$xoopsModuleConfig['theteam_uploaddir']);
        
            
$artimage $HTTP_POST_FILES['cimage']['name'];
            }
        elseif (
$HTTP_POST_VARS["artimage"] != "blank.png")
            {
            
$artimage $myts -> addSlashes$HTTP_POST_VARS["artimage"] );
            } 
        else
            {
            
$artimage '';
            } 

//TN action image:
// ARTICLE IMAGE
        // Define variables
        
$error 0;
        
$word null;
        
$uid $xoopsUser -> uid();
        
$submit 1;
        
$date time();

        if ( 
$HTTP_POST_FILES['dimage']['name'] != "" )
            {
            include_once 
XOOPS_ROOT_PATH '/class/uploader.php';

            if ( 
file_existsXOOPS_ROOT_PATH "/" $xoopsModuleConfig['theteam_uploaddir'] . "/" $HTTP_POST_FILES['dimage']['name'] ) )
                {
                
redirect_header"index.php"1_AM_THETEAM_FILEEXISTS );
                } 
            
$allowed_mimetypes = array( 'image/gif''image/jpeg''image/pjpeg''image/x-png' );

            
uploading($allowed_mimetypes$HTTP_POST_FILES['dimage']['name'], "index.php"0$xoopsModuleConfig['theteam_uploaddir']);
        
            
$actionimage $HTTP_POST_FILES['dimage']['name'];
            }
        elseif (
$HTTP_POST_VARS["actionimage"] != "blank.png")
            {
            
$actionimage $myts -> addSlashes$HTTP_POST_VARS["actionimage"] );
            } 
        else
            {
            
$actionimage '';
            } 
//TN EOF action image


I have tried to remove the "$artimage" and then my action image uploads just fine. I am getting both filenames saved to the DB in any instance so I know I have set-up that part properly. I'm thinking maybe the uploader.php is not euipped to upload two files at a time. But I'm probably wrong...Just don't know how to proceed.

Any tips would be welcomed. :)

Thank you!



234465
tedsmith
Re: How to get Xoogle key?
  • 2004/9/26 13:09

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Agreed - they e-mail you the key once you register with them that you then enter in the admin area of the module. There is no cost attached.



234466
JMorris
Re: New Theme...
  • 2004/9/26 13:05

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


Cool theme! Only one complaint... The text in the right column is difficult to read. Other than that, GREAT WORK!



234467
JasonMR
Re: How to get Xoogle key?
  • 2004/9/26 12:51

  • JasonMR

  • Just can't stay away

  • Posts: 655

  • Since: 2004/6/21


kiwiguy: your statement is wrong

Go and check for yourself

http://www.google.com.au/apis/



234468
JasonMR
Re: How to get Xoogle key?
  • 2004/9/26 12:47

  • JasonMR

  • Just can't stay away

  • Posts: 655

  • Since: 2004/6/21


Goto google and register! Then they will provide you with a developers key, which you enter in the admin section of xoogle.

http://www.google.com/options/index.html

-> click on Web API



234469
kiwiguy
Re: How to get Xoogle key?
  • 2004/9/26 12:47

  • kiwiguy

  • Friend of XOOPS

  • Posts: 295

  • Since: 2004/4/19


Pretty sure you have to register with google and then you get a key from there cost $$$ thats why i have never installed it



234470
foxdream2000
How to get Xoogle key?

I downloaded Xoogle from this XOOPS site and added it in my test site as a new module. And it says, 'This search cannot work until the webmaster updates their google pass key.'

How and where can I get my google passkey? There's no info for that in my admin module or XOOPS block setting category if I use XOOPS admin settings for that.








Login

Who's Online

156 user(s) are online (118 user(s) are browsing Support Forums)


Members: 0


Guests: 156


more...

Donat-O-Meter

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

Latest GitHub Commits