292931
DrBohner
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...
  • 2003/6/19 17:33

  • DrBohner

  • Just popping in

  • Posts: 16

  • Since: 2003/4/4 1


M.,

You made a comment about refreshing the template - within the documentation, "Make sure you refresh your template files for this block"...

What does that mean?... I am not sure how to refresh the templates...

Daniel
drbohner@existinglight.net

www.sprintboat.org



292932
DrBohner
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...
  • 2003/6/19 17:20

  • DrBohner

  • Just popping in

  • Posts: 16

  • Since: 2003/4/4 1


MAN - You R Quick!

Thanks for the good eye - I'll try to determine what it is... now that you've pointed me.

If you see something, too - please update me..

Daniel
drbohner@existinglight.net

www.sprintboat.org



292933
SirTanksAlot
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...

the image is there.. it's size is just set to height=0 width=0

<a href="http://www.sprintboat.org/modules/xoopsgallery/view_photo.php?xoops_imageid=2828&amp;set_albumName=roosters&amp;id=P6140313"><img src="http://www.sprintboat.org/modules/xoopsgallery/cache/albums/roosters/P6140313.thumb.jpg" width="0" height="0" alt="" /></a>


I'm not sure if this picture has something bad in the database or if you are overriding the size settings somewhere...



292934
DrBohner
Re: XoopsGallery Fixes.. Recent Comments Link, New Pics Block showing thumbnail, etc...
  • 2003/6/19 16:58

  • DrBohner

  • Just popping in

  • Posts: 16

  • Since: 2003/4/4 1


M. Shirel,

I thought I had placed all the updated changes in their correct area - perhaps not.

My Random Images block is not displaying an image, anymore.

Can someone make a suggestion where I should look to make the fix?

<www.sprintboat.org>

Daniel
drbohner@existinglight.net



292935
domin
topic image...
  • 2003/6/19 9:55

  • domin

  • Just popping in

  • Posts: 11

  • Since: 2003/5/28


hi, all~

when uploading new article in admin mode, i'd like to
the 'yes' for 'Display Topic Image' as default(currently, 'no' as default)

could u give me answer for how i modify with related-scripts?

thanks!



292936
tom
Re: Autologin for Xoops 2.0.x
  • 2003/6/19 0:55

  • tom

  • Friend of XOOPS

  • Posts: 1359

  • Since: 2002/9/21


Wicked work, although I won't personaly use it, I expect some will, you should make it a news post.

I would like to see the Devs include this as part of the core, as I'm always reluctant to use modifications unless they are core, because when the next release is made this may not be compatible, or at least I would then need to re-code everything back in.

If the devs make it core, can we have the options from admin to chose when we want it to expire, and even chose by groups who we want to allow this feature too.... that would be cool.

Any way good work keep it up my friend.



292937
AndreyRa
X2 NewBB: QuickReply Form
  • 2003/6/18 23:49

  • AndreyRa

  • Just popping in

  • Posts: 17

  • Since: 2003/3/16


This and other hacks available to download here: Some useful hacks

X2 NewBB: QuickReply Form.

Tested with XOOPS 2.0.2, 2.0.3.

File: modules/newbb/viewtopic.php, line 251, after $key1 = $eachpost->postid();:
Quote:

//Begin: QuickReply Hack
$post_id=$key1;
//End: QuickReply Hack


line 309, after foreach ( $postsArray as $eachpost ) {:
Quote:

//Begin: QuickReply Hack
$post_id=$eachpost->postid();
//End: QuickReply Hack


and pre-last line of viewtopic.php, before include XOOPS_ROOT_PATH.'/footer.php';:
Quote:

//Begin: QuickReply Hack
if (!empty($post_id)){
$sql = "SELECT forum_type, forum_name, forum_access, allow_html, allow_sig, posts_per_page, hot_threshold, topics_per_page FROM ".$xoopsDB->prefix("bb_forums")." WHERE forum_id = $forum";
if ( !$result = $xoopsDB->query($sql) ) {
} else {
$forumdata = $xoopsDB->fetchArray($result);
$myts =& MyTextSanitizer::getInstance();
if ( $forumdata['forum_type'] == 1 ) {
$accesserror = 0; //initialize
if ( $xoopsUser ) {
if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
if ( !check_priv_forum_auth($xoopsUser->uid(), $forum, true) ) {$accesserror = 1;};
};
} else {$accesserror = 1;};
} else {
$accesserror = 0;
if ( $forumdata['forum_access'] == 3 ) {
if ( $xoopsUser ) {
if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
if ( !is_moderator($forum, $xoopsUser->uid()) ) {$accesserror = 1;};
};
} else {$accesserror = 1;};
} elseif ( $forumdata['forum_access'] == 1 && !$xoopsUser ) {$accesserror = 1;};
};
if ( $accesserror != 1 ) {
include_once 'class/class.forumposts.php';
$forumpost = new ForumPosts($post_id);
$r_message = $forumpost->text();
$r_date = formatTimestamp($forumpost->posttime());
$r_name = ($forumpost->uid() != 0) ? XoopsUser::getUnameFromId($forumpost->uid()) : $xoopsConfig['anonymous'];
$r_content = _MD_BY." ".$r_name." "._MD_ON." ".$r_date."<br /><br />";
$r_content.= $r_message;
$r_subject = $forumpost->subject();
if (!preg_match("/^Re:/i",$r_subject)) {$qa['subject'] = 'Re: '.$myts->htmlSpecialChars($r_subject);} else {$qa['subject'] = $myts->htmlSpecialChars($r_subject);};
$q_message = $forumpost->text("Quotes");
$hidden = "["."quote]\n";
$hidden .= sprintf(_MD_USERWROTE,$r_name);
$hidden .= "\n".$q_message."["."/quote]";
$message = "";
$pid = $post_id;
unset($post_id);
$topic_id = $forumpost->topic();
$forum = $forumpost->forum();
$isreply =1;
$istopic = 0;
include_once XOOPS_ROOT_PATH."/class/xoopslists.php";
include XOOPS_ROOT_PATH."/include/xoopscodes.php";

$lists = new XoopsLists;
$filelist = $lists->getSubjectsList();

$count = 1;
$qa['icons_list'] = '';
while ( list($key, $file) = each($filelist) ) {
$checked = "";
if ( isset($icon) && $file==$icon ) {$checked = " checked='checked'";}
$qa['icons_list'].="<input type='radio' value='$file' name='icon'$checked />&nbsp;";
$qa['icons_list'].="<img src='".XOOPS_URL."/images/subject/$file' alt='' />&nbsp;";
if ( $count == 8 ) {
$qa['icons_list'].="<br />";
$count = 0;
};
$count++;
};

ob_start();
xoopsCodeTarea("message");

if ( !empty($isreply) && isset($hidden) && $hidden != "" ) {
echo "<input type='hidden' name='isreply' value='1' />";
echo "<input type='hidden' name='hidden' id='hidden' value='$hidden' />
<input type='button' name='quote' class='formButton' value='"._MD_QUOTE."' onclick='xoopsGetElementById(\"message\").value=xoopsGetElementById(\"message\").value + xoopsGetElementById(\"hidden\").value; xoopsGetElementById(\"hidden\").value=\"\";' /> &nbsp;";
}
xoopsSmilies("message");
$qa['message_area']=ob_get_contents();
ob_clean();

//-- Options
if ( $xoopsUser && $forumdata['forum_access'] == 2 && !empty($post_id) ) {
echo "<input type='checkbox' name='noname' value='1'";
if ( isset($noname) && $noname ) {
echo " checked='checked'";
};
echo " />&nbsp;"._MD_POSTANONLY."<br />\n";
};

echo "<input type='checkbox' name='nosmiley' value='1'";
if ( isset($nosmiley) && $nosmiley ) {
echo " checked='checked'";
};
echo " />&nbsp;"._MD_DISABLESMILEY."<br />\n";

if ( $forumdata['allow_html'] ) {
echo "<input type='checkbox' name='nohtml' value='1'";
if ( $nohtml ) {
echo " checked='checked'";
};
echo " />&nbsp;"._MD_DISABLEHTML."<br />\n";
} else {
echo "<input type='hidden' name='nohtml' value='1' />";
};

if ( $forumdata['allow_sig'] && $xoopsUser ) {
echo "<input type='checkbox' name='attachsig' value='1'";
if (isset($HTTP_POST_VARS['contents_preview'])) {
if ( $attachsig ) {
echo " checked='checked' />&nbsp;";
} else {
echo " />&nbsp;";
};
} else {
if ($xoopsUser->getVar('attachsig') || !empty($attachsig)) {
echo " checked='checked' />&nbsp;";
} else {
echo "/>&nbsp;";
};
};

echo _MD_ATTACHSIG."<br />\n";
};

if (!empty($xoopsUser) && !empty($xoopsModuleConfig['notification_enabled'])) {
echo "<input type='hidden' name='istopic' value='1' />";
echo "<input type='checkbox' name='notify' value='1'";
// Check previous subscribed status...
$notification_handler =& xoops_gethandler('notification');
if (!empty($topic_id) && $notification_handler->isSubscribed('thread', $topic_id, 'new_post', $xoopsModule->getVar('mid'), $xoopsUser->getVar('uid'))) {
echo ' checked="checked"';
};
echo " />&nbsp;"._MD_NEWPOSTNOTIFY."<br />\n";
};
$qa['options_area']=ob_get_contents();
ob_clean();
//--Ñàáìèò è õèääåíû
$post_id = isset($post_id) ? intval($post_id) : '';
$topic_id = isset($topic_id) ? intval($topic_id) : '';
$order = isset($order) ? intval($order) : '';
$pid = isset($pid) ? intval($pid) : 0;

echo " <input type='hidden' name='pid' value='".intval($pid)."' />
<input type='hidden' name='post_id' value='".$post_id."' />
<input type='hidden' name='topic_id' value='".$topic_id."' />
<input type='hidden' name='forum' value='".intval($forum)."' />
<input type='hidden' name='viewmode' value='$viewmode' />
<input type='hidden' name='order' value='".$order."' />
<input type='submit' name='contents_preview' class='formButton' value='"._PREVIEW."' />&nbsp;<input type='submit' name='contents_submit' class='formButton' id='contents_submit' value='"._SUBMIT."' />
<input type='button' onclick='location=\"";
if ( isset($topic_id) && $topic_id != "" ) {
echo "viewtopic.php?topic_id=".intval($topic_id)."&forum=".intval($forum)."\"'";
} else {
echo "viewforum.php?forum=".intval($forum)."\"'";
};
echo " class='formButton' value='"._MD_CANCELPOST."' />";
$qa['submit_area']=ob_get_contents();
ob_end_clean();

$xoopsTpl->assign("qa",$qa);
};
};
};
//Begin: QuickReply Hack


4. Goto Control Panel->Administration->Template Editor->Forum->newbb_viewtopic_flat.html (and newbb_viewtopic_thread.html)
insert there you like, closer to end (for example before <{include file='db:system_notification_select.html'}>):
Quote:

<table border='0' cellpadding='0' cellspacing='0' align='center' width='99%'>
<form action='post.php' method='post' name='forumform' id='forumform' onsubmit='return xoopsValidate("subject", "message", "contents_submit");'>
<tr align='center'><td class='odd' width='100%' valign='top'><input type='text' id='subject' name='subject' size='60' maxlength='100' value='<{$qa.subject}>' class='formTextBox' /></td></tr>
<tr align='center'><td class='even' valign='top'><{$qa.icons_list}></td></tr>
<tr align='center'><td class='odd'><{$qa.message_area}></td></tr>
<tr align='center'><td class='even'><{$qa.options_area}></td></tr>
<tr align='center'><td class='odd'><{$qa.submit_area}></td></tr>
</form>
</table>


That's all.

PS. Ðóññêóþ âåðñèþ õàêà - ÷èòàéòå íà xoops.ru



292938
AndreyRa
Autologin for Xoops 2.0.x
  • 2003/6/18 23:29

  • AndreyRa

  • Just popping in

  • Posts: 17

  • Since: 2003/3/16


This and other hacks available to download here: Some useful hacks

Tested with XOOPS 2.0RC3 (please read comments at 2nd step), 2.0.2, 2.0.3.

All line numbers based on XOOPS 2.0.3.

1. File: include/common.php, line 128
after // ############## Login a user with a valid session ##############
*updated:Quote:

//Begin: Autologin hack
if ((empty($HTTP_SESSION_VARS['xoopsUserId'])) && (!empty($HTTP_COOKIE_VARS['al_pass'])&&(!empty($HTTP_COOKIE_VARS['al_uid'])))) {
$al_uid=$HTTP_COOKIE_VARS['al_uid'];
$pass=trim($HTTP_COOKIE_VARS['al_pass']);
$member_handler =& xoops_gethandler('member');
$user =& $member_handler->getUser($al_uid);
if (is_object($user)) {
$uname= $user->getVar('uname');
} else {
unset($uname);
};
unset($user);
$myts =& MyTextsanitizer::getInstance();
$user =& $member_handler->loginUser(addslashes($myts->stripSlashesGPC($uname)), addslashes($myts->stripSlashesGPC($pass)),true);
if ($user != false){
setcookie('al_pass', $pass, time()+86400*100,'/','',0);
setcookie('al_uid',$user->uid(),time()+86400*100,'/','',0);
$user->setVar('last_login', time());
if (session_id()==''){session_destroy(); session_start();};
$HTTP_SESSION_VARS = array();
$HTTP_SESSION_VARS['xoopsUserId'] = $user->getVar('uid');
$HTTP_SESSION_VARS['xoopsUserGroups'] = $user->getGroups();
if ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
setcookie($xoopsConfig['session_name'], session_id(), time()+$xoopsConfig['session_expire'], '/', '', 0);
$HTTP_COOKIE_VARS[$xoopsConfig['session_name']]=session_id();
}
$user_theme = $user->getVar('theme');
if (in_array($user_theme, $xoopsConfig['theme_set_allowed'])) {
$HTTP_SESSION_VARS['xoopsUserTheme'] = $user_theme;
}

};
};
//End: Autologin Hack


2. File: kernel/member.php, line 320, replacement for function loginUser:
for ver. 2.0.2 & 2.0.3 (maybe above)
Quote:

//Begin: Autologin hack
function &loginUser($uname, $pwd, $al_login = false)
{
$criteria = new CriteriaCompo(new Criteria('uname', $uname));
if (!$al_login){$mypwd=md5($pwd);} else {$mypwd=$pwd;};
$criteria->add(new Criteria('pass', $mypwd));
$user =& $this->_uHandler->getObjects($criteria, false);
if (!$user || count($user) != 1) {
return false;
}
return $user[0];
}
//End: Autologin hack


...for ver. 2.0RC3:
Quote:

//Begin: Autologin hack
function &loginUser($uname, $pwd, $al_login = false)
{
$criteria = new CriteriaCompo(new Criteria('uname', $uname));
$criteria->add(new Criteria('pass', $pwd));
$user =& $this->_uHandler->getObjects($criteria, false);
if (!$user || count($user) != 1) {
return false;
}
return $user[0];
}
//End: Autologin hack


3.File: include/checklogin.php, line 46, after line if (false != $user) {:
*updated:Quote:

//Begin: Autologin hack
if (!empty($HTTP_POST_VARS['union_al'])&&($HTTP_POST_VARS['union_al']=='Yes')){
setcookie('al_pass', md5($pass), time()+86400*100,'/','',0);
setcookie('al_uid',$user->uid(),time()+86400*100,'/','',0);
};
//End: Autologin hack


4. File: /user.php, line 73, after line session_destroy();:
*updated:Quote:

//Begin: Autologin hack
setcookie('al_pass', '', time()-33600,'/','',0);
setcookie('al_uname', '', time()-33600,'/','',0);
setcookie('al_uid', '', time()-3600,'/','',0);
//End: Autologin hack


5. Goto Control Panel->Administration->Template Editor->Sytem->system_block_login.html (Edit) and add this there:
<input type="checkbox" name="union_al" value="Yes">Remember password<br>


That's all.

By default it mean 100-days autologin. If you want more - just replace all '100' nums by count of days that you want.

Password stored as md5 hash. No open-text password here.
Username stored as ID.

-- Changed 2003-06-21, 17:20 (GMT+4)
Changed al_uname to al_uid, and other code interconnected with it.


PS. Ðóññêóþ âåðñèþ õàêà - ÷èòàéòå íà xoops.ru



292939
Hober
Re: Ecal fixes
  • 2003/6/18 22:13

  • Hober

  • Just popping in

  • Posts: 40

  • Since: 2003/6/13


I'm still working out a few, but when I'm done I'll make sure to put it all online.



292940
hsalazar
Re: Item-Specific Page Titles in News, wfsection
  • 2003/6/18 15:27

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


BelaS:

I'd also like to be able to include the story headline in the title. So far I haven't figured a way, and the reason is the page title is set in the file theme.html, while the story headline get retrieved until you click on a story link. I guess the logic would be to put an IF statement in the title tags, but I'm not sure it can be done this way... I'll keep trying, and perhaps a wiser fellow can help us...

Happy Xoopsing!







Login

Who's Online

264 user(s) are online (164 user(s) are browsing Support Forums)


Members: 0


Guests: 264


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