1
skspam
Site has started sending users to wrong http:// address
  • 2008/7/20 15:39

  • skspam

  • Just popping in

  • Posts: 16

  • Since: 2008/1/27


My site had been working great then all of the sudden: When a user logs into the site it no longer takes them to the site athttp://home/brimstonerecords.com/xoops but now takes them tohttp://home/brimstonerecords.com/xoops/home/xoops. Of course, users are getting a 404 error page. I have not changed anything within the XOOPS site and my host says they have not changed anything. I'm lost as to what is causing this and how to fix it. Please help!!!

One other thing, if you, after trying to log in, type the correct address into the browser, it does take you to the site and you are logged in.

Sandy



2
skspam
Re: Calculation error in module
  • 2008/4/23 18:50

  • skspam

  • Just popping in

  • Posts: 16

  • Since: 2008/1/27


Thanks for your assistance. I will check that.



3
skspam
Re: Calculation error in module
  • 2008/4/23 18:29

  • skspam

  • Just popping in

  • Posts: 16

  • Since: 2008/1/27


Thank you so much for the kind words Sir. When I copied and pasted it appeared to have all of the page returns intact. My error, sorry I wasted your time. No, I do not think you are processors. You are not very helpful either. You are a co-webmaster? (And -- If anyone knows how to delete my previous post I would appriciate it. If this gentlemans comment is any indication of the kind of help you offer, then I will go it alone. Have a wonderful day!



4
skspam
Calculation error in module
  • 2008/4/23 14:01

  • skspam

  • Just popping in

  • Posts: 16

  • Since: 2008/1/27


Module - Debaser

Using - Xoops, PHP/MySQL

MySQL setup for 'rating' is DOUBLE, 8,4, NOT NULL, default 0.

Calculating a music chart where users can rate songs from 1-10. Ratings are added together to create a total ratings chart. Once the total ratings reach 999 and another person rates the calculated total rating reverts to 1.


-Function to update ratings-


/* updates rating data in itemtable for a given item */ function updatedebaserrating($sel_id) { global $xoopsDB, $xoopsModuleConfig; $totalrating = 0; $votesDB = 0; $finalrating = 0; $query = " SELECT rating FROM ".$xoopsDB->prefix('debaservotedata')." WHERE lid = ".intval($sel_id)." "; $voteresult = $xoopsDB->query($query); $votesDB = $xoopsDB->getRowsNum( $voteresult ); while (list($rating) = $xoopsDB->fetchRow($voteresult)) { $totalrating += $rating; } if (($totalrating) != 0 && $votesDB != 0) { $finalrating = $totalrating / $votesDB; $finalrating = number_format($finalrating, 4); } $xoopsDB->queryF(" UPDATE " . $xoopsDB -> prefix('debaser_files') . " SET rating = '$finalrating', votes = '$votesDB' WHERE xfid = $sel_id" ); } /* -- */


-PHP to calculate ratings-

include 'header.php'; include_once XOOPS_ROOT_PATH.'/modules/debaser/include/functions.php'; foreach ( $_POST as $k => $v ) { ${$k} = $v; } foreach ( $_GET as $k => $v ) { ${$k} = $v; } if (empty($_POST['submit'])) { $_POST['submit'] = ''; } include XOOPS_ROOT_PATH . '/header.php'; if ( $_POST['submit'] ) { $ratinguser = (is_object($xoopsUser)) ? $xoopsUser->uid() : 0; $rating = ($_POST['rating']) ? $_POST['rating'] : 0; // Make sure only 1 anonymous from an IP in a single day. $anonwaitdays = 1; $ip = getenv( "REMOTE_ADDR" ); $lid = intval($_POST['lid']); // Check if Rating is Null if (!$rating) { redirect_header("singlefile.php?id=$lid", 1, _MD_DEBASER_NORATING); exit(); } // Check if REG user is trying to vote twice. if ($ratinguser >= 1) { $yesterday = (time() - (86400 * $anonwaitdays)); $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix('debaservotedata')." WHERE lid = $lid AND ratinguser >= 1 AND ratinghostname = '$ip' AND ratingtimestamp > $yesterday"); list($anonvotecount) = $xoopsDB->fetchRow($result); if ($anonvotecount >= 1) { redirect_header("singlefile.php?id=$lid", 1, _MD_DEBASER_VOTEONCE); exit(); } } // Check if ANONYMOUS user is trying to vote more than once per day. if ($ratinguser == 0) { $yesterday = (time() - (86400 * $anonwaitdays)); $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix('debaservotedata')." WHERE lid = $lid AND ratinguser = 0 AND ratinghostname = '$ip' AND ratingtimestamp > $yesterday"); list($anonvotecount) = $xoopsDB->fetchRow($result); if ($anonvotecount >= 1) { redirect_header("singlefile.php?id=$lid", 1, _MD_DEBASER_VOTEONCE); exit(); } } // All is well. Add to Line Item Rate to DB. $newid = $xoopsDB->genId($xoopsDB->prefix('debaservotedata'). "_ratingid_seq"); $datetime = time(); $xoopsDB->query("INSERT INTO ".$xoopsDB->prefix('debaservotedata')." (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES ($newid, $lid, $ratinguser, $rating, '$ip', $datetime)" ); // All is well. Calculate Score & Add to Summary (for quick retrieval & sorting) to DB. updatedebaserrating($lid); $ratemessage = _MD_DEBASER_VOTEAPPRE . "<br />" . sprintf(_MD_DEBASER_THANKYOU, $xoopsConfig['sitename']); redirect_header("singlefile.php?id=$lid", 1, $ratemessage); exit(); } else { redirect_header("singlefile.php?id=$lid", 1, _MD_DEBASER_UNKNOWNERROR); exit(); } include 'footer.php';?>


I have been searching for a couple days now but can't find the problem. I need the calculations to continue up to 10000. Number of Votes is calculating right. The only thing that is reverting back to 1 is the rating calculations when they go above 999.

Can anyone help?

Thanks
Sandy



5
skspam
Module info has changed into strange characters
  • 2008/2/20 15:30

  • skspam

  • Just popping in

  • Posts: 16

  • Since: 2008/1/27


I am using the module Debaser. It has a field to upload music and also to upload additional info about a song. My problem is that the additional info. section (which was working a few days ago) is now changing their input into numbers.

Example:
Additional info:
000007E8 000007F8 00004AB5 00005996 00031168 00001ABC 00008322 0000828E 0001802F 0002B578� 00000000 00000210 00000724 00000000009A6C4C 00000000 0053FB98 00000000 00000000 00000000 00000000 00000000 00000000�

I do not understand what has happened. I have only changed one file within the module and that file had nothing to do directly with uploads. Any idea's would be appriciated.

Thanks
Sandy



6
skspam
Module not adding in mysql database -
  • 2008/2/15 5:39

  • skspam

  • Just popping in

  • Posts: 16

  • Since: 2008/1/27


I'm using Debaser Module. It allows files to be rated by users. Ratings are from 1 to 10. These values should be added to the MySQL database. What is happening is that when a user rates a file the value of that single rating is carried over to the database but NOT adding to the values that are already in the database. What ultimately happens, is only the lates rating is added to the database. I'm lost as to where to look to fix this problem.

Can anyone PLEASE point me in the right direction???

Sandy



7
skspam
Need to allow users to edit file uploads with module Debaser
  • 2008/2/12 19:21

  • skspam

  • Just popping in

  • Posts: 16

  • Since: 2008/1/27


I have installed module Debaser. After a few bug fixes I've got it working great, problem is, when a user uploads a song they have no way to go back and delete, edit, etc. Any idea's? I'm a newbie but do have some programming knowledge. Could maybe add this feature to the module if I had examples of simular coding. Or, is there a module out there that will allow users access to files they've uploaded in order to edit? Any suggestions would be helpful

Thanks
Sandy



8
skspam
Re: Module Debaser Help Please (solved)
  • 2008/2/5 7:09

  • skspam

  • Just popping in

  • Posts: 16

  • Since: 2008/1/27


Jen, and anyone else who may be having this problem....

Problem: Debaser 0.92b module will not open catagories and rating is not available.

Reason: genre.php has an error in the code at line 55.

solution: Change line 55 from:

WHERE t.genreid=mysql_real_escape_string($gid)

to:

WHERE t.genreid=".mysql_real_escape_string($gid)."

This fixed the problem. Simple quotation marks made all the difference.

Sandy



9
skspam
Re: Module Debaser Help Please
  • 2008/2/4 22:47

  • skspam

  • Just popping in

  • Posts: 16

  • Since: 2008/1/27


Jen, one other thing you might check is your blocks. Also, if you have permissions set in debaser you will need to make sure that groups are allowed access to the module in xoops.

Sandy



10
skspam
Re: Module Debaser Help Please
  • 2008/2/4 22:45

  • skspam

  • Just popping in

  • Posts: 16

  • Since: 2008/1/27


Jen,

They should be in xoops/class. I think they come packaged with xoops, but mine were missing and I had to install them.

Did you set group permissions in your xoops? If these are not set correctly users will not be able to listen to files, (I think).

Sandy




TopTop
(1) 2 »



Login

Who's Online

253 user(s) are online (172 user(s) are browsing Support Forums)


Members: 0


Guests: 253


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