• Welcome to Simple Machines Community Forum. Please login or sign up.
October 26, 2021, 02:23:22 PM

News:

Check out the SMF Function DB!


Breeze

Started by Suki, March 21, 2014, 07:50:09 PM

Previous topic - Next topic

Snrj

good mod thanks suki
Antes mod turkish lang pls :P

Antes

Quote from: snrj on April 07, 2014, 12:37:08 PM
good mod thanks suki
Antes mod turkish lang pls :P

There will be a translation but currently dealing with mid-term exams so you have to wait at least 2 more weeks.

desai_amogh

Hey,

That @mentions thing is only applicable in comments and statuses??

Can you make it global ?? mentions should rather work in any post or reply you make..

player.samp

This package is a bit bugged.

After enabling this, I cannot see the summary profile. Only the wall. Even when I click on the summary option, as an administrator, I cannot see any information about someone, not location, not age, not username, not IP. Nothing.

Suki

Quote from: desai_amogh on April 09, 2014, 05:10:51 AM
Hey,

That @mentions thing is only applicable in comments and statuses??

Can you make it global ?? mentions should rather work in any post or reply you make..

It would require a couple of file edits which goes against my policy with this mod. If I can find some time I will post a guide on how to enable mentions for posts.


Quote from: player.samp on April 09, 2014, 07:15:00 AM
This package is a bit bugged.

After enabling this, I cannot see the summary profile. Only the wall. Even when I click on the summary option, as an administrator, I cannot see any information about someone, not location, not age, not username, not IP. Nothing.

There is a whole new section for the summary page:

index.php?action=profile;area=static

I added two links to that page, on in the profile menu and another one in the main menu.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Making tough decisions, so you don't have to.

ryan_dwight

Hi,

Can you help me on this critical error


Apply Filter: Only show the error messages of this URL
http://www.myforum.com/index.php?action=wall
Apply Filter: Only show the errors with the same message
Wrong value type sent to the database. Array of integers expected. (data)
Function: getCount
Apply Filter: Only show the errors from this file
File: /Sources/Breeze/BreezeQuery.php
Line: 177

170: $result = $this->_smcFunc['db_query']('', '
171: SELECT status_id
172: FROM {db_prefix}breeze_status
173: WHERE '. ($where),
174: array(
175: 'data' => $data
176: )
==>177: );
178:


Thank you

Suki

On your Sources/Breeze/BreezeQuery.php file put this:

global $user_info;
      if ($user_info['is_admin'])
         var_dump($data);die;

right below this line:

if (empty($data) || empty($where))
         return $count;


and go visit that page again logged in as an admin, it should give you a blank page with some data, post that data here.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Making tough decisions, so you don't have to.

ryan_dwight

April 11, 2014, 12:35:46 PM #47 Last Edit: April 11, 2014, 12:49:42 PM by ryan_dwight
array(29) { [0]=> string(4) "1127" [1]=> string(4) "1745" [2]=> string(4) "1833" [3]=> string(3) "181" [4]=> string(4) "2947" [5]=> string(4) "3837" [6]=> string(4) "3552" [7]=> string(3) "262" [8]=> string(4) "2625" [9]=> string(4) "5097" [10]=> string(4) "4013" [11]=> string(4) "3782" [12]=> string(4) "8899" [13]=> string(4) "7520" [14]=> string(4) "1999" [15]=> string(3) "394" [16]=> string(4) "4984" [17]=> string(5) "10471" [18]=> string(2) "61" [19]=> string(5) "11196" [20]=> string(5) "11449" [21]=> string(3) "633" [22]=> string(5) "12518" [23]=> string(4) "6477" [24]=> string(4) "2187" [25]=> string(5) "13811" [26]=> string(5) "13868" [27]=> string(5) "13960" [28]=> string(2) "20" }

here's the data

edit:
i don't know if this is the effect when I edited but if i click on my profile i had a white screen with this
string(1) "1"

Suki

OK, replace this code:

global $user_info;
      if ($user_info['is_admin'])
         var_dump($data);die;

with

$data = array_map('intval', $data);

That should take care of the error.  Yes, both the wall page and the users profile shares the same common background code thats why when you went to your profile page there was also a blank page with some data on it..
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Making tough decisions, so you don't have to.

ryan_dwight

i got a new error

when i click the wall on my profile

Quote
An Error Has Occurred!
The database value you're trying to insert does not exist: data

Suki

mm, thats strange, ca you post the full code in the    protected function getCount($data, $where)  function, that is, the code between { and }
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Making tough decisions, so you don't have to.

Suki

Nevermind, I forgot I used a different type of var depending on who was the one calling this method, to avoid that I normalized the method to always expect an array and/or convert another type to an array. Expensive but easier and much more generic.

Use the attached file, just replace the old one at /Sources/Breeze/ with this one.

Going to release a new patch later.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Making tough decisions, so you don't have to.

ryan_dwight

ooops i just sent you message.

its working now thanks Suki

Suki

New release: 1.0.3

This new release fixes new found bugs:

- Add BreezeQuery::getStatus() to allow users to get status data directly from the DB
- Fixed silly bugs with error strings
- BreezeQuery::getCount() now work with arrays, each element gets casted as integer before passing the array to avoid errors. It also removes the need to pass sql code, it now needs the column name only.

To update you need to get the package, unzip it and upload the Themes and Sources directories to your forum root, that is, overwriting the old Breeze files.

https://github.com/MissAllSunday/Breeze/releases/tag/v1.0.3

The green button is a ready to install package.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Making tough decisions, so you don't have to.

ryan_dwight

Hi Suki

after I reinstall the update I had this critical error

Apply Filter: Only show the error messages of this URL
http://www.myforum.com/index.php?action=wall
Apply Filter: Only show the errors with the same message
Wrong value type sent to the database. Array of integers expected. (id)
Function: getStatusByUser
Apply Filter: Only show the errors from this file
File: /Sources/Breeze/BreezeQuery.php
Line: 623

Suki

oh, I didn't realize BreezeQuery::getStatusByUser()  was using the same buddy list full of strings :(

the same solution applies here as well, on that file find these lines (around line 605):


// Work with arrays
$id = (array) $id;


and replace with:


// Work with arrays
$id = array_map('intval', (array) $id);
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Making tough decisions, so you don't have to.

Shkic

Great mod Suki! I have a quoestion, will you planning add a "general wall" where all users can post their statuses etc.? :)

Suki

Well, the general wall is already there, is just based on a per user setting and their buddy list, changing that wall to a general wall where you can see all the activity from all users on a forum isn't really that difficult, just a matter of removing the LIMIT conditional on the specific method that handles the general wall status.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Making tough decisions, so you don't have to.

Sweetwater

A great mod, thankyou.  :)

Any chance of members being able to attach or insert images etc into their wall posts?

Also for the forum noobs who will stuff up the BB codes, is it possible for the standard post option like emoticons, bold, font face, color etc to be shown above or below the wall post box, same as in the general forum?

Kind regards,

Suki

Unfortunately, an attachment system would be needed to be coded from scratch and it will cause several issues, from security to file permissions problems.

I don't know about including the editor, the text area is pretty small and including a rich text editor several times on a page can slow down the user's browser.

Theres a lot of things I would like to add, unfortunately, I need to spend most of my time on SMFs development so I cannot dedicate as much time to this as I used to.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Making tough decisions, so you don't have to.

Advertisement: