vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > Add-On Modules & Modifications > Module & Modification Discussion & Requests

Reply
 
Thread Tools Display Modes
  #1  
Old 12-29-2005, 11:52 AM
Cyricx Cyricx is offline
Junior Member
 
Join Date: Jun 2004
Posts: 25
Default Uploading new smilies adds sites full url

Okay, when uploading new smilies you have to go back afterwords and edit the smilie to add the full url path for the smilie to show up on the mainpage.

Which is increasingly annoying.

Anyone know how to edit like the insert function in the admincp/images.php file so that the mysql query will add the full url for the site?
Reply With Quote
  #2  
Old 12-29-2005, 01:01 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Uploading new smilies adds sites full url

Upload the vbacmps_install.php file to your admincp directory, go to it in your browser, and select the option to update your image paths.
Reply With Quote
  #3  
Old 12-29-2005, 01:36 PM
Cyricx Cyricx is offline
Junior Member
 
Join Date: Jun 2004
Posts: 25
Default Re: Uploading new smilies adds sites full url

only problem there is you have to go through all of your smilies

Instead of just the ones that are not yet done.

So it can make a huge board like mine with well over 200 smilies, a headache to go through to update 30 heheeh.

Anyway I can add an if statment or something to the file to only show the ones that need to be updated?
Reply With Quote
  #4  
Old 12-30-2005, 04:04 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Uploading new smilies adds sites full url

First look for this query:
PHP Code:
            $countsmilies $db->query_first("SELECT COUNT(*) AS count FROM " TABLE_PREFIX "smilie"); 
Replace with this:
PHP Code:
            $countsmilies $db->query_first("SELECT COUNT(*) AS count FROM " TABLE_PREFIX "smilie WHERE smiliepath NOT LIKE '" $vbulletin->options['bburl'] . "%'"); 
Then find:
PHP Code:
            $smilies $db->query("
                    SELECT * FROM " 
TABLE_PREFIX "smilie
                    ORDER BY smilieid
                    LIMIT " 
. ($minlimit 1) . ", $perpage
            "
); 
Replace with this:
PHP Code:
            $smilies $db->query("
                    SELECT * FROM " 
TABLE_PREFIX "smilie
                    ORDER BY smilieid
                    WHERE smiliepath NOT LIKE '" 
$vbulletin->options['bburl'] . "%'
                    LIMIT " 
. ($minlimit 1) . ", $perpage
            "
); 
And that should only pull smilies that have not already been prefixed.
Reply With Quote
  #5  
Old 12-30-2005, 06:47 PM
Cyricx Cyricx is offline
Junior Member
 
Join Date: Jun 2004
Posts: 25
Default Re: Uploading new smilies adds sites full url

Awesome bro! Thanks so much!
Reply With Quote
  #6  
Old 12-30-2005, 09:27 PM
KW802's Avatar
KW802 KW802 is offline
Administrator
 
Join Date: Mar 2004
Location: A galaxy far, far away...
Posts: 5,030
Default Re: Uploading new smilies adds sites full url

Brian, for sites that have a lot of smilies that's a nice change. Any chance of getting that in the stock code for the next release?
Reply With Quote
  #7  
Old 12-31-2005, 01:12 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: Uploading new smilies adds sites full url

I don't see why it would hurt anything.

*Adds code to dev files*
Reply With Quote
  #8  
Old 12-31-2005, 03:58 PM
KW802's Avatar
KW802 KW802 is offline
Administrator
 
Join Date: Mar 2004
Location: A galaxy far, far away...
Posts: 5,030
Default Re: Uploading new smilies adds sites full url

Quote:
Originally Posted by Brian
I don't see why it would hurt anything.

*Adds code to dev files*
Excellent! I know from first-hand experience with helping people re-install CMPS after a vB upgrade that for sites that have a lot of smilies that this change will a very nice timesaver.

It's the little touches that are the hallmarks of quality.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do all vBA Sites look the same? Nero2 "How Do I..." Questions 32 07-24-2005 05:42 PM
New Sites gblue Show off your vBadvanced! 0 07-11-2005 01:48 PM
My new sites smackLAN Show off your vBadvanced! 18 05-05-2005 12:17 AM


All times are GMT -4. The time now is 12:03 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.