91
Dylian
Re: Help with top entries block
  • 2009/7/14 20:11

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


(I'm no expert but...) I don't think you can edit the block to only show the REAL posts.

I have a other solution for you but it will not remove the number of comments already made from the number of userposts. It will just not add a future comment to the number of userposts.

Here's my hack (I haven't tested it, so i don't know if it works...):
Open root/include/comment_post.php
On line 171, 211, 222 and 252 change
$add_userpost true;
to
$add_userpost false;

(Or just use search and replace to replace it everywhere )

This should work, if it doesn't just say it then i will search further.

Greets Dylian.

[edit]For deleting the number of comments from the total user posts a function could be created wich does something like:
<?php
//File: update_total_posts.php
//This doesn't realy work, it's just a example of how it would look like

include("mainfile.php"); //If you place it in the root
include(XOOPS_ROOT_PATH."/header.php");

$users getallusers(); //Doesn't exist
$totalposts gettotalposts(); //Doesn't exist
$totalcomments gettotalcomments(); //Doesn't exist

foreach ($users as &$user) {
 
$totalposts $totalposts $totalcomments;
 
updatedb($user$totalposts); //Doesn't exist}
}

include(
XOOPS_ROOT_PATH."/footer.php");
?>


Just a example .[/edit]
Dylian.eu | Webdevelopment
| http://dylian.eu |

Dylian Melgert | Home
| http://me.dylian.eu |

Arcus College Shedule Notification Service
| http://arcus.dylian.eu |



92
Dylian
[offtopic: About XOOPS Mobile Module] 7 and Xoops 2.3.0 RC2
  • 2009/7/6 19:50

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Do you understand dutch? (Because i can't remember mentioning this project enywhere other then my website).

About your question (This is no public announcement so please no further questions about this...):
The project you mentioned (XOOPS Mobile/xMobile) is a module for showing XOOPS content on a mobile phone or pda. It's based on the old XOOPS WAP hack from blizengineers, but now it gets al the settings from the database (exept wich plugins to use, this is not finished yet).
For a demostration of this module you can go to http://www.dylian.melgert.net/software/beta/modules/mobile .

It uses plugins to get information from module's, in the XOOPS hack this was done using just separate php file's and linking them in the index.php.

I hope you understand it now?

Greets Dylian.

[edit]I will release it when i've got everything to work with the database (i hope within two mont's but dont promise anything)[/edit]

[edit2]I am also trying to update the HAWHAW (used for rendering the wap/mobile pages) kernel to the latest version, but this is a lot harder then i tought [/edit2]

Dylian.eu | Webdevelopment
| http://dylian.eu |

Dylian Melgert | Home
| http://me.dylian.eu |

Arcus College Shedule Notification Service
| http://arcus.dylian.eu |



93
Dylian
Re: Liaise 1.27 and Xoops 2.3.0 RC2
  • 2009/7/6 19:12

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


I've updated the module and added a configuration option where you can set a text visible if there are no forms for the current user.

You can download (the updated) xForms HERE (same link as before, i've only updated the zip).

Greets Dylian
Dylian.eu | Webdevelopment
| http://dylian.eu |

Dylian Melgert | Home
| http://me.dylian.eu |

Arcus College Shedule Notification Service
| http://arcus.dylian.eu |



94
Dylian
Re: Liaise 1.27 and Xoops 2.3.0 RC2
  • 2009/7/6 16:33

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Ok, i see, ill try to explain it..

If a user goes to a form he doesn't have access to he will be redirected to the mainpage. At the mainpage you will find all forms that are active for the current user. Because you have no forms active for anonymous users they won't see anything.

You could fix this by placing a block on the homepage of xforms wich is only visable for anonymous users.

Greets Dylian.
Dylian.eu | Webdevelopment
| http://dylian.eu |

Dylian Melgert | Home
| http://me.dylian.eu |

Arcus College Shedule Notification Service
| http://arcus.dylian.eu |



95
Dylian
Re: Liaise 1.27 and Xoops 2.3.0 RC2
  • 2009/6/30 15:42

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


About your the captcha form, did you enable it in the module settings??

About the file's (In the future this wil go in the readme)...
clone.exe : A WINDOWS program for cloning the module.
clone.au3 : The AutoIt source file of the program.
clone.ini : The settings used for the program (DON'T CHANGE THE CONTENT OF IT!)
GrepWin.exe : A WINDOWS tool for replacing text in multiple files, my program uses this tool.

What you say about that you get a blank page when viewing a page you don't have permision to is new, it works just fine for me. I get a XOOPS redirect with a text like you sad...

And at last, wich version of XOOPS do you use?
xForms is only designed for 2.3* !

Greets Dylian
Dylian.eu | Webdevelopment
| http://dylian.eu |

Dylian Melgert | Home
| http://me.dylian.eu |

Arcus College Shedule Notification Service
| http://arcus.dylian.eu |



96
Dylian
Re: liaise and 2.3.3
  • 2009/6/6 18:06

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Dylian.eu | Webdevelopment
| http://dylian.eu |

Dylian Melgert | Home
| http://me.dylian.eu |

Arcus College Shedule Notification Service
| http://arcus.dylian.eu |



97
Dylian
Re: Liaise 1.27 and Xoops 2.3.0 RC2
  • 2009/6/5 18:44

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Here is my clone of liaise named xforms, it uses the xoops_captcha and has been updated to use latest classes.

An import script is include, but it doesn't work always. [edit] A import script for liaise is included, it should work now...[/edit]

You can download xfoms HERE
Greets Dylian

---
Ive not released the module yet, because its not finished it may still change!!!
Dylian.eu | Webdevelopment
| http://dylian.eu |

Dylian Melgert | Home
| http://me.dylian.eu |

Arcus College Shedule Notification Service
| http://arcus.dylian.eu |



98
Dylian
Re: Dutch translation
  • 2009/5/30 16:03

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Please go to http://sourceforge.net/project/showfi ... id=41586&package_id=75007 for the latest Dutch translation, the version on my website is outdated.

Greets Dylian.
Dylian.eu | Webdevelopment
| http://dylian.eu |

Dylian Melgert | Home
| http://me.dylian.eu |

Arcus College Shedule Notification Service
| http://arcus.dylian.eu |



99
Dylian
Re: WF-Books HACK
  • 2009/5/18 17:08

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


I fixed it myself (with some code from MC Donald).

For everyone who needs the same:

Replace the content of "modules/wfbooks/blocks/wfbooks_top.php" with:
<?php
/**
 * $Id: wfbooks_top.php v 1.00 21 June 2005 John N Exp $
 * Module: WF-links
 * Version: v1.0.3
 * Release Date: 21 June 2005
 * Developer: John N
 * Team: WF-Projects
 * Licence: GNU
 */
if (!defined('XOOPS_ROOT_PATH')) {
    die(
'XOOPS root path not defined');
}
/**
 * controleerBlockgroups()
 * 
 * @param integer $cid
 * @param string $permType
 * @param boolean $redirect
 * @return 
 **/
function controleerBlockgroups$cid 0$permType 'WFBookCatPerm'$redirect false ) {
    global 
$xoopsUser;

    
$groups is_object$xoopsUser ) ? $xoopsUser -> getGroups() : XOOPS_GROUP_ANONYMOUS;
    
$gperm_handler = &xoops_gethandler'groupperm' );

    
$module_handler = &xoops_gethandler'module' );
    
$module = &$module_handler -> getByDirname'wfbooks' );

    if ( !
$gperm_handler -> checkRight$permType$cid$groups$module -> getVar'mid' ) ) ) {
        if ( 
$redirect == false ) {
            return 
false;
        } else {
            
redirect_header'index.php'3_NOPERM );
            exit();
        } 
    } 
    unset( 
$module );
    return 
true;


/**
 * Function: b_mylinks_top_show
 * Input   : $options[0] = date for the most recent links
 *                            hits for the most popular links
 *                   $block['content'] = The optional above content
 *                   $options[1]   = How many links are displayes
 * Output  : Returns the most recent or most popular links
 */
function b_wfbooks_top_show$options ) {
    global 
$xoopsDB;

    
$block = array();
    
$modhandler = &xoops_gethandler'module' );
    
$wflModule = &$modhandler -> getByDirname"wfbooks" );
    
$config_handler = &xoops_gethandler'config' );
    
$wflModuleConfig = &$config_handler -> getConfigsByCat0$wflModule -> getVar'mid' ) );

    
$wfmyts = &MyTextSanitizer :: getInstance();

    
//$result = $xoopsDB -> query( "SELECT lid, cid, title, date, hits FROM " . $xoopsDB -> prefix( 'wfbooks_links' ) . " WHERE published > 0 AND published <= " . time() . " AND (expired = 0 OR expired > " . time() . ") AND offline = 0 ORDER BY " . $options[0] . " DESC", $options[1], 0 );
    
$result $xoopsDB -> query"SELECT lid, cid, title, date, hits, uitgever, schrijver, isbn, screenshot FROM " $xoopsDB -> prefix'wfbooks_links' ) . " WHERE published > 0 AND published <= " time() . " AND (expired = 0 OR expired > " time() . ") AND offline = 0 ORDER BY " $options[0] . " DESC"$options[1], );
 
    while ( 
$myrow $xoopsDB -> fetchArray$result ) ) {
        if ( 
false == controleerBlockgroups$myrow['cid'] ) || $myrow['cid'] == ) {
            continue;
        } 
        
$linkload = array();
        
$title $wfmyts -> htmlSpecialChars$wfmyts ->stripSlashesGPC($myrow["title"]) );
        if ( !
XOOPS_USE_MULTIBYTES ) {
            if ( 
strlen$myrow['title'] ) >= $options[2] ) {
                
$title substr$myrow['title'], 0, ( $options[2] -) ) . "...";
            } 
        } 
        
$linkload['id'] = intval($myrow['lid']);
        
$linkload['cid'] = intval($myrow['cid']);
        
$linkload['title'] = $title;
        if ( 
$options[0] == "date" ) {
            
$linkload['date'] = formatTimestamp$myrow['date'], $wflModuleConfig['dateformat'] );
        } elseif ( 
$options[0] == "hits" ) {
            
$linkload['hits'] = $myrow['hits'];
        } 
        
$linkload['dirname'] = $wflModule -> getVar'dirname' );
        
$linkload['screenshot'] = $myrow['screenshot'];
        
$linkload['screenshots_dir'] = $wflModuleConfig['screenshots'];
        
$linkload['uitgever'] = $myrow['uitgever'];
        
$linkload['schrijver'] = $myrow['schrijver'];
        
$linkload['isbn'] = $myrow['isbn'];
        
$linkload['boek_url'] = XOOPS_URL."/modules/".$linkload['dirname']."/singlelink.php?cid=".$linkload['cid']."&amp;lid=".$linkload['id'];
        
// Begin taalvariables
        
$linkload['lang_title'] = _MB_WFB_TITLE;
        
$linkload['lang_uitgever'] = _MB_WFB_UITGEVER;
        
$linkload['lang_schrijver'] = _MB_WFB_SCHRIJVER;
        
$linkload['lang_isbn'] = _MB_WFB_ISBN;
        
// Eind taalvariables        
        
        
$block['links'][] = $linkload;
    } 
    unset( 
$_block_check_array );
    return 
$block;


/**
 * b_wfbooks_top_edit()
 * 
 * @param $options
 * @return 
 **/ 
function b_wfbooks_top_edit$options ) {
    
$form "" _MB_WFB_DISP "&nbsp;";
    
$form .= "<input type='hidden' name='options[]' value='";
    if ( 
$options[0] == "date" ) {
        
$form .= "date'";
    } else {
        
$form .= "hits'";
    } 
    
$form .= " />";
    
$form .= "<input type='text' name='options[]' value='" $options[1] . "' />&nbsp;" _MB_WFB_FILES "";
    
$form .= "&nbsp;<br />" _MB_WFB_CHARS "&nbsp;<input type='text' name='options[]' value='" $options[2] . "' />&nbsp;" _MB_WFB_LENGTH "";
    return 
$form;


?>


and replace the content of "modules/wfbooks/templates/blocks/wfbooks_block_new.html" with:
<table width="auto" id="nieuwste_boeken" border="0" onclick='document.location="<{$linkload.boek_url}>"'>
 <
tr>
 <{foreach 
item=linkload from=$block.links}>
    <{if 
$linkload.screenshot != ""}>
     <
td id="screenshot" width="auto" style="font-weight: bold; text-align: left; vertical-align: top; padding-left: 8px;">
      <
a href="<{$linkload.boek_url}>">
       <
img src="<{$xoops_url}>/<{$linkload.screenshots_dir}>/<{$linkload.screenshot}>" width="100px" border="0" />
      </
a
     </
td>
    <{/if}>
     <
td id="boek_infol" width="auto" style="font-weight: bold; text-align: left; vertical-align: top; padding-left: 8px;">
      <
a href="<{$linkload.boek_url}>">
       <{if 
$linkload.uitgever != ""}><{$linkload.lang_uitgever}><br /><{/if}>
       <{if 
$linkload.title != ""}><{$linkload.lang_title}><br /><{/if}>
       <{if 
$linkload.isbn != ""}><{$linkload.lang_isbn}><br /><{/if}>
       <{if 
$linkload.schrijver != ""}><{$linkload.lang_schrijver}><{/if}>
      </
a
     </
td>
     <
td id="boek_infoc" width="auto" style="font-weight: bold; text-align: left; vertical-align: top; padding-left: 8px;">
      <
a href="<{$linkload.boek_url}>">
       <{if 
$linkload.uitgever != ""}>:<br /><{/if}>
       <{if 
$linkload.title != ""}>:<br /><{/if}>
       <{if 
$linkload.isbn != ""}>:<br /><{/if}>
       <{if 
$linkload.schrijver != ""}>:<{/if}>
      </
a
     </
td>
     <
td id="boek_infor" width="auto" style="font-weight: bold; text-align: left; vertical-align: top; padding-left: 8px; border-right: 3px dotted #000000;">
      <
a href="<{$linkload.boek_url}>">
       <{if 
$linkload.uitgever != ""}><{$linkload.uitgever}><br /><{/if}>
       <{if 
$linkload.title != ""}><{$linkload.title}><br /><{/if}>
       <{if 
$linkload.isbn != ""}><{$linkload.isbn}><br /><{/if}>
       <{if 
$linkload.schrijver != ""}><{$linkload.schrijver}><{/if}>
      </
a
     </
td>
 <{/foreach}>
 </
tr>
</
table>


And as last replace the content of "modules/wfbooks/templates/blocks/wfbooks_block_top.html" with:

<table id="meest_gelezen_boeken" border="0">
    <
tr>
    <{foreach 
item=linkload from=$block.links}>
        <{if 
$linkload.screenshot != ""}>
            <
td id="screenshot">
                <
a href="<{$linkload.boek_url}>">
                    <
img src="<{$xoops_url}>/<{$linkload.screenshots_dir}>/<{$linkload.screenshot}>" width="100px" border="0" />
                </
a
            </
td>
        <{/if}>
    <{/foreach}>
    </
tr>
</
table>


Greets Dylian.
Dylian.eu | Webdevelopment
| http://dylian.eu |

Dylian Melgert | Home
| http://me.dylian.eu |

Arcus College Shedule Notification Service
| http://arcus.dylian.eu |



100
Dylian
Re: WF-Books HACK
  • 2009/5/12 16:27

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Dylian.eu | Webdevelopment
| http://dylian.eu |

Dylian Melgert | Home
| http://me.dylian.eu |

Arcus College Shedule Notification Service
| http://arcus.dylian.eu |




TopTop
« 1 ... 7 8 9 (10) 11 »



Login

Who's Online

60 user(s) are online (43 user(s) are browsing Support Forums)


Members: 0


Guests: 60


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