21
optikool
Re: Does everyone have to make a buck on twitter blocks
  • 2009/9/30 0:51

  • optikool

  • Not too shy to talk

  • Posts: 154

  • Since: 2007/3/26


I believe twitter's feed is just another rss feed. You should be able to use any news feed module from the repository. It would be just a matter of styling it. I created a feed module a few months ago just to see what it would like to pull in my twitter feed that I never use... as well as CNN feeds and my wife's gallery feed so I could put my daughter's gallery onto my page. I'd say check out some of the news feed modules and custom style them.

By the way I don't quite understand your title... Are you saying people are wanting to charge you for creating a custom twitter module? If that's the case, they may be charging you because they value their time.



22
optikool
Re: Problem with x-movie module
  • 2009/9/25 19:21

  • optikool

  • Not too shy to talk

  • Posts: 154

  • Since: 2007/3/26


cosco,

If the link you provided was the exact link that gave you the error, I would have to guess you got that error because lid was missing the integer value... lid= instead of lid=23 or some other number. Hope Joomla will do a better job for you. :)

optikool



23
optikool
Re: XOOPS 2.4.x Translations
  • 2009/9/25 15:53

  • optikool

  • Not too shy to talk

  • Posts: 154

  • Since: 2007/3/26


That is actually the poor way of coding templates. Hopefully it is just that, an example, and you are not really coding in that way. There should not be any width and height tags in the HTML code and there's no reason why you need to be using inline styles when a stylesheet is easier to maintain and read, especially when you are creating this template yourself and not trying to override others styles. If you are making templates for others, your templates will go through less ridicule is you separate the presentation from your code.



24
optikool
Re: XOOPS 2.4.x Translations
  • 2009/9/24 20:19

  • optikool

  • Not too shy to talk

  • Posts: 154

  • Since: 2007/3/26


DCrussader I hope you realize how different Joomla is from Xoops. Joomla is build on an MVC module that makes components and plugins more standardized... XOOPS doesn't (hopefully one day it will). I don't know where you got that html code block from but you shouldn't be using that as an example unless you are showing how not to code html... in that case it's fine. HTML and Styling should be seperate. 'define' is a PHP keyword and reading define statements is not that difficult if you know how to read between quotes. Joomla decided to use configuration ini files similar to Java. There really is no difference in the readability of the two formats, it just depends on the person and their ability to read. Also from a development standpoint when a developer turns on debugging, he should see when a constant (_X_XSOAP_SERVERKEY) has been defined twice and make the correction. I don't know if you'd be able to do that with a Joomla ini file. But it is helpful to know some php so that you can understand why you use define. The ini files from Joomla are pretty much just text files so anybody can modify those.

I will admit that a lot of the html code writing coming from some of the XOOPS Developers is maddening especially when you need to change something. XOOPS admins should put out some coding standards, like when to use tables and when to use Divs. Personally I think Joomla looks to be a pretty cool CMS with a lot of features XOOPS doesn't have but there are also some things Joomla doesn't have that I'd like to see. For example a nice gallery. I don't like the fact I have to use a code block in an article in the majority of the galleries Joomla offers. Why can't I have an admin menu that allows me to create new galleries and assign them to different categories like I can do with my gallery module. I also don't like any of the movie modules for pretty much the same reason. Maybe you can only add code blocks or maybe that is the easiest for the developer to do, not sure... but that's pathetic. Since my website has both a gallery and videos, this is important to me, however it might not be important to others.

One thing the erks me about XOOPS though is the module directory being in the url and the fact that I cannot create friendly URLs. I'm hoping this if fixed as well. What would really be nice is if XOOPS was completely re designed so that it uses an MVC framework but we'll see if that happens.



25
optikool
Re: Problem with x-movie module
  • 2009/9/24 19:25

  • optikool

  • Not too shy to talk

  • Posts: 154

  • Since: 2007/3/26


Most likely that internal server error will be in your log files for your website... Can you post that error to the form. Cannot see admin pages without a login... are you also getting this error message on the frontend or just the backend? Also when I look at the query string from the URL that you provided you are missing the lid which is the id for the movie. This can give you an internal server error most likely coming from the sql query string. When I finally make it back to modifying this module again I will be sure to check for that.

I took a look at your site and noticed it is now joomla. Personally I haven't found a movie module that has all the features of x_movie... this is one of the reasons why I wanted to create one. However I'm currently reading up on this CMS and how it's components are created.



26
optikool
Re: adding Function to Block
  • 2009/9/18 16:14

  • optikool

  • Not too shy to talk

  • Posts: 154

  • Since: 2007/3/26


Hi xsell,

Your code should look similar to this... If after you make the changes date still appears in the box, just change it to a number or uninstall and reinstall your module so the database is refreshed. Also in b_message_blocks_show you should make sure you are getting an integer by using is_number($options[1]) and/or (int) $options[1] so that your query string is limited by an integer and not a string.

Your Block File message_blocks.php... Looks like you were missing the 1 in options[] for message number input under b_message_blocks_edit.
<?php
include ("../../../mainfile.php");
include_once 
XOOPS_ROOT_PATH."/modules/message/message.textsanitizer.php";
function 
b_message_blocks_show($options)
{
    global 
$xoopsUser$xoopsConfig$xoopsDB$xoopsModule$xoopsTheme;
    
$block = array ();
    
$myOption = (int) $options[1];
    
$myts = & messageTextSanitizer::getInstance();
    
$sql $xoopsDB->query("select count(xid) from ".$xoopsDB->prefix("message"));
    include_once 
XOOPS_ROOT_PATH."/include/xoopscodes.php";
    list (
$numrows) = $xoopsDB->fetchRow($sql);
    
$result $xoopsDB->query("SELECT name, comment, submitter, ip, date FROM ".$xoopsDB->prefix("message")." order by xid desc limit ".$myOption."");
    include 
XOOPS_ROOT_PATH."/modules/message/badwords.php";
    while (
$myrow $xoopsDB->fetchArray($result))
    {
        
$message = array ();
        
$Badwordfilter $xoopsModuleConfig['message']; //
        
$message['name'] = $myts->htmlSpecialChars($myrow['name']);
        
$message['comment'] = $myts->makeTareaData4Show(SmartCensor($myrow['comment'], $Badwordfilter), 0);
        
$message['date'] = formatTimestamp($myrow['date'], 'm');
        
$block['lang_xname'] = _MB_MESSAGENAME;
        
$block['lang_xcomment'] = _MB_MESSAGE_COMMENT;
        
$block['lang_xdate'] = _MB_MESSAGEDATE;
        
$block['lang_xsubmit'] = _MB_MESSAGESUBMIT;
        
$block['lang_guestuser'] = _MB_MESSAGEGUESTUSER;
        
$block['message'][] = $message;
    }
    return 
$block;
}
function 
b_message_blocks_edit($options)
{
    
$form ""._MB_MESSAGE_DISP."&nbsp;";
    
$form .= "<input type='hidden' name='options[]' value='";
    
$form .= "date'";
    
$form .= " />";
    
$form .= "<input type='text' name='options[1]' value='".$options[1]."' />&nbsp;"._MB_MESSAGE_NUM."";
    return 
$form;
}

?>


Your Block Config section in xoops_version.php. Take not of the formtype and default.
<?php
$x 
0;
$modversion['config'][$x]['name'] = 'message';
$modversion['config'][$x]['title'] = '_MI_MESAAGE';
$modversion['config'][$x]['description'] = '';
$modversion['config'][$x]['formtype'] = 'yesno';
$modversion['config'][$x]['valuetype'] = 'int';
$modversion['config'][$x]['default'] = 0;
?>


Your Blocks section in xoops_version.php
<?php
// Blocks
$modversion['blocks'][1]['file'] = "message_blocks.php";
$modversion['blocks'][1]['name'] = _MI_MESSAGE_TITLE;
$modvertion['blocks'][1]['description'] = "MESSAGE";
$modversion['blocks'][1]['show_func'] = "b_message_blocks_show";
$modversion['blocks'][1]['edit_func'] = "b_message_blocks_edit";
$modversion['blocks'][1]['can_clone'] = true ;
$modversion['blocks'][1]['options'] = "date|10|19";
$modversion['blocks'][1]['template'] = 'message_blocks.html';
?>


Hope this helps...
Optikool



27
optikool
Re: Wordpress and XOOPS, getting the best of both worlds
  • 2009/6/30 8:43

  • optikool

  • Not too shy to talk

  • Posts: 154

  • Since: 2007/3/26


I also added wordpress to my XOOPS site. I was using weblog before but this blog had limited functionality and I had no idea what happened to the original developer and didn't want to continue developing it myself. I didn't want wordpress in the same folder as root... instead I put it in a folder called blog and modified an old impression module to create a link to the blog. Instead of have the impression module output a normal XOOPS page, I just modified the index.php redirect to my wordpress blog. I then modified the wordpress header and added the header from my XOOPS theme and customized the rest of wordpress to look like my main site. Last I used a news_feed module I created earlier to get the rss feed of new posts from wordpress and displayed it on my site. I had a friend take a look and he didn't know I was now using wordpress as my blog. If you want to take a look you can see my site here...http://www.optikool.com

Optikool



28
optikool
Re: For x-movie users and coders
  • 2009/6/19 19:01

  • optikool

  • Not too shy to talk

  • Posts: 154

  • Since: 2007/3/26


I just uploaded the zip again. As for your second problem. That's an over site on my part. I actually have all of the videos popup regardless. I can look into having the videos be embedded if you like.

Optikool



29
optikool
Re: Include webmaster email
  • 2009/6/9 6:26

  • optikool

  • Not too shy to talk

  • Posts: 154

  • Since: 2007/3/26


Hi xsell,

Are you asking how to covert this script to send in XOOPS or do you just need to know how to get the admin email? If you need to just get the admin email try using $xoopsConfig['adminmail'] to get the email address.

Optikool



30
optikool
Re: For x-movie users and coders
  • 2009/5/21 19:45

  • optikool

  • Not too shy to talk

  • Posts: 154

  • Since: 2007/3/26


Hi onasre,

From line 1097 to 1110 in the admin/index.php replace
$cid $_POST['cid'];
    
$pid $_POST['pid'];
    
$title $myts->htmlSpecialChars($_POST['title']);
    
$imgurl "";

    if ( empty(
$title))
    {
        
redirect_header("index.php"2_MD_X_MOVIE_ERRORTITLE);
    }
    if ((
$_POST["imgurl"]) || ($_POST["imgurl"] != ""))
    {
        
$imgurl $myts->htmlSpecialChars($_POST["imgurl"]);
    }
    
$weight $myts->htmlSpecialChars($_POST['weight']);

with
$cid = (int) $_POST['cid'];
    
$pid = (int) $_POST['pid'];
    
$title mysql_real_escape_string($_POST['title']);
    
$imgurl "";

    if ( empty(
$title))
    {
        
redirect_header("index.php"2_MD_X_MOVIE_ERRORTITLE);
    }
    if ((
$_POST["imgurl"]) || ($_POST["imgurl"] != ""))
    {
        
$imgurl mysql_real_escape_string($_POST["imgurl"]);
    }
    
$weight = (int) $_POST['weight'];


I put the change in x_movie and uploaded it again.

Optikool




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



Login

Who's Online

171 user(s) are online (106 user(s) are browsing Support Forums)


Members: 0


Guests: 171


more...

Donat-O-Meter

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

Latest GitHub Commits