xoops forums

Forum Index


Board index » All Posts (tank1955)




tank1955

Module Developer
Posted on: 2010/2/1 23:39
tank1955
tank1955 (Show more)
Module Developer
Posts: 276
Since: 2007/9/7 1
#1

Re: 2.4.3 and apostrophe

Thanks for the info. Will be cleaning up the code in the next Shoutbox release.


tank1955

Module Developer
Posted on: 2009/10/25 14:16
tank1955
tank1955 (Show more)
Module Developer
Posts: 276
Since: 2007/9/7 1
#2

Re: Captcha problem when multiple instances on page

Even though I figured out a hack to make the image id's unique the first image is still overwritten by the second image.


tank1955

Module Developer
Posted on: 2009/10/25 13:30
tank1955
tank1955 (Show more)
Module Developer
Posts: 276
Since: 2007/9/7 1
#3

Re: Captcha problem when multiple instances on page

You are correct ghia. That is actually where I started. As I worked through how the class is supposed to work I eventually narrowed it down to the setConfig method that appears to be the problem.

The image.php file contains the code which renders the image and makes the tag assignment. Here is the specific code I am looking at:

function loadImage()
    {
        
$ret "<img id='" . ($this->config['name']) . "' src='" XOOPS_URL "/" $this->config["imageurl"] . "' onclick="this.src='" . XOOPS_URL . "/" . $this->config["imageurl"] . "?refresh='+Math.random()"."" style='cursor: pointer; vertical-align: middle;' alt='' />";
        return 
$ret;
    }


From what I have been able to figure out I believe that once the "name" value is assigned in the config array contained in the config.php it can not be changed. This is based on the following found in xoopscaptcha.php:

function setConfig($name$val)
    {
        if (isset(
$this->$name)) {
            
$this->$name $val;
        } else {
            
$this->config[$name] = $val;
        }
        
        return 
true;
    }


As soon as the config array is loaded $this->name is also assigned so performing the setConfig can reassign $this->name but not $this->config["name"].


tank1955

Module Developer
Posted on: 2009/10/24 15:57
tank1955
tank1955 (Show more)
Module Developer
Posts: 276
Since: 2007/9/7 1
#4

Captcha problem when multiple instances on page

For next version of ShoutBox module I thought I would revisit the use of captcha images for anonymous posts. By rights the image id tag of the captcha image should be unique so there are no conflicts if another instance appears on the same page. For example, the person who reported this had defined the shoutbox block to appear in the Right column on All Pages. Therefore it would appear on the Registration page which also employs captcha. So now we have two instances of captcha but both images have the same id tag, which is the default one provided in the class config file.

I am working with 2.3.3 as I explore this issue. I thought it should be as simple as calling setConfig() but it appears not. Here is what my code looks like in the block.

include_once(XOOPS_ROOT_PATH.'/class/xoopsform/formcaptcha.php');
$shoutcaptcha = new XoopsFormCaptcha();
$result $shoutcaptcha->setConfig('name','shoutboxcaptcha');
$block['captcha_caption'] = $shoutcaptcha->getCaption();
$block['captcha_render'] = $shoutcaptcha->render();


Calling setConfig appears to have no affect on the config value. Am I overlooking something?


tank1955

Module Developer
Posted on: 2009/10/8 11:10
tank1955
tank1955 (Show more)
Module Developer
Posts: 276
Since: 2007/9/7 1
#5

Re: Problem in flashchat

Are you installing flashchat as an XOOPS cms integration or as a stand alone application? Both methods will work but if it is integrated then only registered users on the site will be able to access the chatroom.

There are several parameters to adjust in the config file to get everything working properly. There are also a couple tricks to get the login and chatroom to appear as a block within the XOOPS theme structure if that is what you are looking for.

I am sure we can help you.


tank1955

Module Developer
Posted on: 2009/9/18 0:23
tank1955
tank1955 (Show more)
Module Developer
Posts: 276
Since: 2007/9/7 1
#6

Video Tube - YouTube search problem

YouTube recently changed a few items contained in the JSON feed which affects the format Video Tube expects when searching YouTube videos. The results of search will appear but when you hover over an image it will change to a red X. That is because the Video ID code is incorrect.

We will be providing the corrected code to adapt to the format change when we release version 1.86 but for those who want the fix immediately here it is.

On line 112 of /modules/videotube/include/youtube.js you will find a function called 'getVideoId'.
Here is what the code looks like now in version 1.85
function getVideoId(url){
  var 
match url.lastIndexOf('=');
  if (
match) {
    
id url.substring(match+1);
    return 
id;
  }
}


Here is the code with the changes that will get things working again.
function getVideoId(url){
  var 
match url.indexOf('=');
  if (
match) {
    
id url.substring(match+1,match+12);
    return 
id;
  }
}



tank1955

Module Developer
Posted on: 2009/9/8 0:16
tank1955
tank1955 (Show more)
Module Developer
Posts: 276
Since: 2007/9/7 1
#7

Re: Exclude group from Command Post

I picked up Shoutbox development awhile back and we are now at v4.05. I don't recognize the section of code you pasted. It would help me if I knew which file this code appears in and what version of the module you are using.


tank1955

Module Developer
Posted on: 2009/9/4 3:10
tank1955
tank1955 (Show more)
Module Developer
Posts: 276
Since: 2007/9/7 1
#8

Re: Shoutbox 4.5

First check the Preference parameter "Text Line Length". This determines the input box display length. If that is set correctly be sure and check your theme's style sheet to see if one of the module's style sheet values is being over-ridden.


tank1955

Module Developer
Posted on: 2009/9/2 1:21
tank1955
tank1955 (Show more)
Module Developer
Posts: 276
Since: 2007/9/7 1
#9

Re: how to use xoopstree for creating categories and subcategoires

I decided I wanted to use XoopsTree class for providing categories in Video Tube. The problem I found was debug generated warning that XoopsTree class had been deprecated and XoopsObjectTree should be used instead. I am sure there were good reasons for this but I found XoopsTree very easy to understand and implement so I made a copy of the class, renamed it VideoTubeTree and added it as part of the Video Tube module.

There are five components involved to add categories and subcategories to your module.
1. The class file (in my case /modules/videotube/class/videotubetree.php)
2. MySQL database table containing category data
3. Logic in index.php file to extract category data from table and place in template variables
4. Code in template file to display the category data
5. Code in admin/index.php to administer category data

I hope you find the code helpful. Be sure to download VideoTube v1.85 to explore the code.


tank1955

Module Developer
Posted on: 2009/4/22 2:28
tank1955
tank1955 (Show more)
Module Developer
Posts: 276
Since: 2007/9/7 1
#10

Re: pages selection (videotube)

In videotube v1.81 I introduced the module style sheet located in the module's /style/ subdirectory. In line 365 and line 905 in the module root level index.php file you will find the definition for the $videocss variable.

$xoopsTpl->assign('videocss'XOOPS_URL."/modules/videotube/style/videotube.css");


To display pagination there is a preferences parameter for defining how to display. The parameter is labeled Video Page Navigation Type Select and the options are Graphic Images, Numbers, and Drop-Down List.

Hope this helps.



TopTop
(1) 2 3 4 ... 11 »