News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

SMF Media Gallery (SMG) - 2.0.5 is out! (December 2)

Started by SMGTeam, September 09, 2008, 03:14:05 PM

Previous topic - Next topic

Kindred

Clara,

well, first of all, it was never a "problem". It was working as intended.
Also, the change that I gave you is correct....    the way you left it, the system is checking for stuff it does not have to...    $user_info is never used and $user_info['-'] dpesn't even exist.

You can't just replace variables with junk...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

ardd

 Thanks Kindred for the point in the right direction, the menu bar is and will be pretty "Buttoned Up" especially in Admin group view there should be just enough room for what I want there. I'm just letting you know why this was an issue at all, I even trimmed the "My" out of "My Messages" to save a little space and avoid having to use drop downs. 

I think I have accomplished this by changing the last line of the code below to "false"
'mgallery' => array(
'title' => $txt['mgallery_gallery'] . (empty($user_info['-']) || $user_info['-'] == -1 ? '' : ' [<b>' . $user_info['-'] . '</b>]'),
'href' => $scripturl . '?action=mgallery',
'show' => allowedTo('mgallery_access'),
'sub_buttons' => empty($user_info['mgal_unseen']) || $user_info['mgal_unseen'] == -1 ? array() : array(
'mgallery_home' => array(
'title' => $txt['mgallery_home'],
'href' => $scripturl . '?action=mgallery',
'show' => true,
),
'mgallery_unseen' => array(
'title' => $txt['mgallery_unseen'],
'href' => $scripturl . '?action=mgallery;sa=unseen',
'show' => true,
 

I did this so it would be easily reversible should I wish to change it back.

If there will be any bad consequence from this please let me know, everything seems to be working correctly and throwing up no errors at this time, although it's right after TG dinner and the triptophan is whooping my energy levels :)

Thank you for your time and patience with this, I am learning quite a bit from working with this and have went from 0 to Ummm... in two weeks hopefully with a little study and experience I can get from Ummm... to DOH! in another two weeks  :D 

Nao 尚

@NeKit> I can't change the theme on the Test account. Please enable that. Also, what browser are you using?

@Kindred> Ah, girls... Sometimes you've gotta let them do things the way they want, even when they're screwed up ;)
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

NeKit1000

Quote from: Nao/Gilles on November 27, 2009, 04:03:18 AM
@NeKit> I can't change the theme on the Test account. Please enable that. Also, what browser are you using?
I've enabled now. I use Mozilla Firefox 3.5.5.

Nao 尚

Okay, reproduced with Firefox only...
Open MGallery.template.php, look for:

<div class="floatleft" style="margin-left: 10px; overflow: auto">', template_button_strip($buttons, $direction), '

Replace with:

<div style="margin-left: 10px; overflow: auto">', template_button_strip($buttons, $direction), '

(I figured it out in under a minute by opening Firebug on the page, inspecting the button strip div, and clicking the Disable icon next to the 'floatleft' class. I don't like Firefox, but if there's one thing I like in it, it's Firebug!)
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Nao 尚

Quote from: Nao/Gilles on November 27, 2009, 08:55:06 AM
I don't like Firefox, but if there's one thing I like in it, it's Firebug!
Okay, one less reason for me to use Firefox: Firebug Lite! Just discovered that, and its button in my toolbar is here to stay... Fantastic stuff :)
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

NeKit1000

Quote from: Nao/Gilles on November 27, 2009, 08:55:06 AM
<div class="floatleft" style="margin-left: 10px; overflow: auto">', template_button_strip($buttons, $direction), '

Replace with:

<div style="margin-left: 10px; overflow: auto">', template_button_strip($buttons, $direction), '
Thanks, it helped.

Tiribulus

Quote from: Nao/Gilles on November 27, 2009, 09:04:22 AM
Quote from: Nao/Gilles on November 27, 2009, 08:55:06 AM
I don't like Firefox, but if there's one thing I like in it, it's Firebug!
Okay, one less reason for me to use Firefox: Firebug Lite! Just discovered that, and its button in my toolbar is here to stay... Fantastic stuff :)

I couldn't live without Firebug

Nao 尚

Opera has its own cool Developer Tools, but they're only usable in Opera 10 (not Opera 9), and since I use Opera 9 mainly, having Firebug Lite is cool. :) Just a bit sad that it doesn't have a javascript tracer. I have to use Opera's in this situation. No biggie.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Clara Listensprechen

Quote from: Kindred on November 27, 2009, 12:46:54 AM
Clara,

well, first of all, it was never a "problem". It was working as intended.
Also, the change that I gave you is correct....    the way you left it, the system is checking for stuff it does not have to...    $user_info is never used and $user_info['-'] dpesn't even exist.

You can't just replace variables with junk...
What a Bill Gates way of looking at things. It was a problem. Putting in junk to replace junk did the job, as the junk I replaced the junk with was invisible on the button. My junk got the job done.  Thank you.
I shall continue to be an impossible person so long as those who are now possible remain possible. {Michael Bakunin 1814-1876}

Clara Listensprechen

Quote from: ardd on November 27, 2009, 02:26:11 AM
Thanks Kindred for the point in the right direction, the menu bar is and will be pretty "Buttoned Up" especially in Admin group view there should be just enough room for what I want there. I'm just letting you know why this was an issue at all, I even trimmed the "My" out of "My Messages" to save a little space and avoid having to use drop downs. 

I think I have accomplished this by changing the last line of the code below to "false"
'mgallery' => array(
'title' => $txt['mgallery_gallery'] . (empty($user_info['-']) || $user_info['-'] == -1 ? '' : ' [<b>' . $user_info['-'] . '</b>]'),
'href' => $scripturl . '?action=mgallery',
'show' => allowedTo('mgallery_access'),
'sub_buttons' => empty($user_info['mgal_unseen']) || $user_info['mgal_unseen'] == -1 ? array() : array(
'mgallery_home' => array(
'title' => $txt['mgallery_home'],
'href' => $scripturl . '?action=mgallery',
'show' => true,
),
'mgallery_unseen' => array(
'title' => $txt['mgallery_unseen'],
'href' => $scripturl . '?action=mgallery;sa=unseen',
'show' => true,
 

I did this so it would be easily reversible should I wish to change it back.

If there will be any bad consequence from this please let me know, everything seems to be working correctly and throwing up no errors at this time, although it's right after TG dinner and the triptophan is whooping my energy levels :)

Thank you for your time and patience with this, I am learning quite a bit from working with this and have went from 0 to Ummm... in two weeks hopefully with a little study and experience I can get from Ummm... to DOH! in another two weeks  :D 

Ah.  I'm pasting this into my notebook for easy use in the event anybody else thinks they know what I want better than I do.
I shall continue to be an impossible person so long as those who are now possible remain possible. {Michael Bakunin 1814-1876}

Nao 尚

@Clara> I don't get it. The line Kindred gave you was exactly what you were trying to do: it removed the entire [number] thing. Adding more code isn't gonna help, it's simply going to give more work to your server for nothing...

@aard> Hmm, that makes me think I never actually hide the 'Unseen' menu link if the Unseen area is disabled... Unfortunately, that particular setting is in $mgalSettings, which is not loaded at the time the menu is populated. Hmm, what can I do...?
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

tripl3r

Any way to make the Galleries file show in MB instead of KB?

Nao 尚

I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Tiribulus

#5214
Quote from: Nao/Gilles on November 27, 2009, 11:09:38 AM
Opera has its own cool Developer Tools, but they're only usable in Opera 10 (not Opera 9), and since I use Opera 9 mainly, having Firebug Lite is cool. :) Just a bit sad that it doesn't have a javascript tracer. I have to use Opera's in this situation. No biggie.

Forgive the further sidetrack, but what's wrong with Opera 10 which I have seen, but not really played with the dev tools yet. Also, what don't you like about Firefox? I saw Firebug lite a little while back, but haven't tried that at all. Firebug itself has helped me immensely in chasing down all kindsa stuff I would have never found on my own. Too bad there wasn't a way it could drill more directly back into the PHP. That would be an absolute Godsend.

Kindred

Clara,

After your explanation, I knew EXACTLY what you were trying to do, and my code did so.
The code that you (and aard) are using is calling for a variable that is not defined, not used and serves no useful purpose at all...   In other words using server overhead when it's not needed (a very windows way of looking at things, to use your own comparison)

Seriously...   if you code like that, your server is eventually going to have issues
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Nao 尚

Quote from: Tiribulus on November 27, 2009, 03:02:20 PM
Forgive the further sidetrack, but what's wrong with Opera 10 which I have seen, but not really played with the dev tools yet.
Oh... Opera 10 is fantastic. Opera is fantastic, period.

You asked for it? Here it is.
I have my own custom theme for Opera, which I worked on for quite some time to achieve some pixel-perfect bliss for power browsers like me (250+ tabs open at all times). Opera 10 introduced about 1 or 2 extra lines below tabs, and 2-3 lines above them. That's about 3-4 lines extra, which I have a hard time dealing with, lol. I contacted them to get a fix or at least a workaround, but didn't get any answer (hopefully it at least made a few Opera employees laugh or something). Also, I tried running Opera 9 & 10 at the same time and v10 always seems to use a bit more memory. Considering 250+ tabs already takes a minimum of 700MB of Ram on a 2-gig rig (always wanted to say that), it's not something I can overlook. (I could add more Ram but I'm on a 32-bit OS so... Pretty useless.)

QuoteAlso, what don't you like about Firefox?
Try having 250 tabs in Firefox without a crash. Try having 50 tabs in Firefox without a crash, actually... Try using 20 simultaneous tabs in Firefox without getting a headache after a couple of hours. The fact that it can't have less than 20px-wide tabs (or something) is a nightmare. Plus, the UX is bad IMHO. Mouse gestures should be implemented by default for instance, as well as session management. It uses a ton of Ram. And on and on... I've been browsing the web for 13 years now. I was a IE2 addict, because it was fast and full-featured, compared to Netscape. I feel that Firefox is the Netscape of today. Chrome is the IE2 of today, but Opera is better for power browsers. (I couldn't live without my hundreds of tabs, I guess.)

NB: when I say 250+ tabs, I may be exaggerating. I just checked, and I currently have 217 tabs open. My worst record is dated from October 21, 2009, with a whopping 265 tabs. My session file crossed the 300KB barrier and then I figured I'd better close 'a few' tabs. I haven't had less than 100 tabs open since 2006. Pretty much when I started focusing on web development...

QuoteI saw Firebug lite a little while back, but haven't tried that at all. Firebug itself has helped me immensely in chasing down all kindsa stuff I would have never found on my own. Too bad there wasn't a way it could drill more directly back into the PHP. That would be an absolute Godsend.
PHP debuggers do exist, but they require you to install a local server. I personally don't give a damn about that. I debug my PHP the manly way -- with strategically positioned print_r() calls. It's not going to earn me a Nobel, but at least it gets the work done. If you're lucky you might catch a glimpse of my print_r()'s while I'm working on SMG... Just spend a lot of time refreshing pages on media.noisen.com, lol.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Arantor

Btw, if you want to drill Firebug into the PHP, try FirePHP, it's spews most of the data in variables into headers for Firebug to pick up.
Holder of controversial views, all of which my own.


Tiribulus

Quote from: Nao/Gilles on November 27, 2009, 05:41:17 PM
<< a long interesting response >>>

200 + tabs? You're a seriously disturbed individual. I hope you know that and are seeking appropriate help.

By your standard I am not a power browser (I think the other one works for Microsoft  ??? ), but it can't be denied that FF has gotten a lot bulkier in the last couple years and especially since v.3.

I am not familiar with PHP debugging, manly or otherwise. I'm not sure if that's the same thing as simply seeing what script code is responsible for the resulting HTML.

I again always appreciate your comprehensive responses.

@Arantor:

I played around with getting FirePHP going a few months ago, but there were a whole bunch of considerations, including security that I didn't feel competent enough to tackle.

Arantor

@Tiribulus: The solution in that case is to not run the development on a public live server but do it offline where security is not an issue (that's how I do all my development)
Holder of controversial views, all of which my own.


Advertisement: