vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - Your Current Alexa Rank (Integrated With VB) (https://vborg.vbsupport.ru/showthread.php?t=115116)

Mr Chad 05-08-2006 10:00 PM

Your Current Alexa Rank (Integrated With VB)
 
If you like it click
https://vborg.vbsupport.ru/


Installation Time: <2 mins
Template Edits: 1
Uploads: 1
VB Version: This actually works on 3.5.0 - 3.5.4
Live Example (Look at my footer): http://beasttoast.com

Description:
This hack will make your site go to alexa.com once a day and grab your current alexa rank. You can place your rank anywhere by using $alexarank.

Installation Instructions:
  1. Open your 'includes/config.php' and Find:
    PHP Code:

    ?> 

    Replace With:
    PHP Code:

    global $specialtemplates;
    $specialtemplates array_merge(
    $specialtemplates, array(
    'alexarank',
    ));  
    ?> 

  2. Upload Product! :)
  3. Now add this in any template where ever you want to show the rank:
    PHP Code:

    {$vbulletin->alexarank


    For example in footer page:
    HTML Code:

    <br /> Alexa Rank: {$vbulletin->alexarank} <br />
  4. Run the schedulted task:
    'Alexa Rank'
Screen Shot:

https://vborg.vbsupport.ru/


FAQ:- NONE
If you like it click
https://vborg.vbsupport.ru/

Mr Chad 05-09-2006 12:43 AM

Can someone please test this out for me :)

I dont have time right now.

Mr Chad 05-09-2006 12:54 AM

Come on, lol

Smiry Kin's 05-09-2006 12:59 AM

i will soon dude :)

Smiry Kin's 05-09-2006 01:18 AM

is this right?

File Name: './alexarank_update.php.txt'

Smiry Kin's 05-09-2006 01:23 AM

cant seem to get it to work :(

Mr Chad 05-09-2006 01:29 AM

whats wrong with it?

Smiry Kin's 05-09-2006 01:39 AM

Alexa Rank is:

*blank*

nothing shows? :S

Ahsin1 05-09-2006 01:48 AM

Nice

Smiry Kin's 05-09-2006 01:48 AM

its the $alexarank

that isnt working i've checked the txt file and its shows my rank inside it

Smiry Kin's 05-09-2006 01:55 AM

its $alexa

found it, works perfect. :)

Mr Chad 05-09-2006 02:02 AM

na but it dowsnt show in numberformat hmm

Mr Chad 05-09-2006 02:02 AM

shit its $alexacount

edited the plugin to work with $alexarank

ok it works :)

Smiry Kin's 05-09-2006 02:05 AM

Quote:

Originally Posted by chatbum
shit its $alexacount

edited the plugin to work with $alexarank

ok it works :)

ok thanks dude

Smiry Kin's 05-09-2006 02:09 AM

working perfect.

/me Installs

SMO 05-09-2006 02:26 AM

Ok, I'll bite...what is AlexaRank?

Mr Chad 05-09-2006 02:30 AM

Your alexa rank is your traffic rank.

http://www.alexa.com (Sponsored by Amazon.com)

Oddjob 05-09-2006 03:01 AM

screenshot anyone????

Mr Chad 05-09-2006 03:15 AM

added, its just text :)


https://vborg.vbsupport.ru/

COBRAws 05-09-2006 05:34 AM

Quote:

Originally Posted by Smiry Kin's
is this right?

File Name: './alexarank_update.php.txt'

It should be

File Name: './alexarank_update.php'

Aurous 05-09-2006 06:28 AM

Is storing the result in a txt file better than storing in database? (most preferably datastore). If interested, I can help you convert this hack to store the results in db instead of a txt file. It wont even cost you a query as it will be stored in datastore. Will wait for your reply. Plus large sites with multiple webservers that deserve to show off their Alexa rank wont be too happy with storing text in a file.

murrtex 05-09-2006 09:00 AM

try this in the footer

HTML Code:

<center>
Alexa Rank: <a href="http://www.alexa.com/data/details/traffic_details?q=&url=www.yoursite.com" target="_blank">$alexarank</a></center>


Developer 05-09-2006 11:48 AM

nice hack m8,
btw::confused: many users use the same avatar :D

Mr Chad 05-09-2006 12:26 PM

Quote:

Originally Posted by Aurous
Is storing the result in a txt file better than storing in database? (most preferably datastore). If interested, I can help you convert this hack to store the results in db instead of a txt file. It wont even cost you a query as it will be stored in datastore. Will wait for your reply. Plus large sites with multiple webservers that deserve to show off their Alexa rank wont be too happy with storing text in a file.

Yea but then on every page view it has to pull it from the database im scared lol :P

Mr Chad 05-09-2006 12:37 PM

Quote:

Originally Posted by murrtex
try this in the footer

HTML Code:

<center>
Alexa Rank: <a href="http://www.alexa.com/data/details/traffic_details?q=&url=www.yoursite.com" target="_blank">$alexarank</a></center>


I like :) once i actually release a template edit ill prolly use your if you dont mind :)

Aurous 05-09-2006 12:52 PM

As I said earlier, you can store it in datastore and it will not affect the number of queries on your database (it will remain the same for all pages). Let me update your hack to work with database real quick and then you can see the results.

Also, larger sites using rsync or different filesystem on multiple webservers will have to update the text file too, which is quite unnecessary.

Mr Chad 05-09-2006 01:03 PM

Wow this sounds good now, cant wait to see what you come up with :)

(this will eliminate the text file)

Aurous 05-09-2006 02:49 PM

Ok, created product this time instead of plugin and can be uninstalled easily.

Product file adds scheduled tasks automatically and also adds row in datastore for alexarank.

You can edit the files anyway you like and update your script in this thread if you wish.

Also, I was thinking, instead of asking users to add website url, why not use bburl stored in database? I didnt test this yet, but you can try it out.

Code:

$YourWebsite = $vbulletin->options['bburl'];
Aurous

ps. file updated. added instructions in zip.

Brandon Sheley 05-09-2006 03:06 PM

nice mod, thx

firstrebel 05-09-2006 07:37 PM

chatbum and Aurous, very nice. *clicks install*

Bob

Mr Chad 05-09-2006 08:59 PM

Quote:

Originally Posted by Aurous
Ok, created product this time instead of plugin and can be uninstalled easily.

Product file adds scheduled tasks automatically and also adds row in datastore for alexarank.

You can edit the files anyway you like and update your script in this thread if you wish.

Also, I was thinking, instead of asking users to add website url, why not use bburl stored in database? I didnt test this yet, but you can try it out.

Code:

$YourWebsite = $vbulletin->options['bburl'];
Aurous

ps. file updated. added instructions in zip.

does the bburl contain 'http://www.' if so it would have to be
PHP Code:

$YourWebsite preg_replace('#http://www.#s'''$vbulletin->options['bburl']); 

wow, i look at the product you made :). Learned alot, I think its time for me to update my other hack.

Snake 05-10-2006 06:18 PM

Wow just what I want. Thanks!

Mr Chad 05-10-2006 10:21 PM

ok updated it,

thanks to me and Aurous, now all you need to do is really 3 steps (4 if installing a plugin counts)

Aurous 05-10-2006 10:40 PM

Nice! You should also update the mod version in the product file with the one in this thread (2.337) just so people dont get confused when they look at their products. Not that we'll be updating this hack any further, but just a good practice for future upgrades to your hacks. :up:

Mr Chad 05-10-2006 10:42 PM

Quote:

Originally Posted by Aurous
Nice! You should also update the mod version in the product file with the one in this thread (2.337) just so people dont get confused when they look at their products. Not that we'll be updating this hack any further, but just a good practice for future upgrades to your hacks. :up:

my bad :)

*off-topic: how would I make a product also install a plugin?*

Aurous 05-10-2006 11:05 PM

Quote:

Originally Posted by chatbum
my bad :)

*off-topic: how would I make a product also install a plugin?*


Just before:
Code:

</product>
Add this for custom plugins and templates:
Code:

        <plugins>
                <plugin active="1">
                        <title>Plugin Title</title>
                        <hookname>hook_name</hookname>
                        <phpcode><![CDATA[

                        //Active Plugin Code Here

                        ]]>
                        </phpcode>
                </plugin>
                <plugin active="0">
                        <title>Plugin2 Title</title>
                        <hookname>hook_name</hookname>
                        <phpcode><![CDATA[

                        //Inactive Plugin2 Code Here

                        ]]>
                        </phpcode>
                </plugin>
        </plugins>


        <templates>
                <template name="template_name1" templatetype="template" date="1234567890" username="Aurous" version="3.5.4"><![CDATA[

                <!-- Insert Template Here -->

                ]]>
                </template>
                <template name="template_name2" templatetype="template" date="1234567890" username="Aurous" version="3.5.4"><![CDATA[

                <!-- Insert Template Here -->

                ]]>
                </template>
        </templates>

Hope this helps.

firstrebel 05-15-2006 04:09 PM

This is not updating automatically, I have to run it manually. Any ideas please?

Bob

Mr Chad 05-16-2006 09:31 PM

Quote:

Originally Posted by firstrebel
This is not updating automatically, I have to run it manually. Any ideas please?

Bob

did you delete the schduled task?

firstrebel 05-17-2006 02:15 PM

Not only is it in the scheduled tasks listing, but it there twice ??? I will delete one and see what happens, though that should not make a difference.

Bob

firstrebel 05-17-2006 07:51 PM

You might get a better Alexa rating if you get users to download and use the Alexa toolbar. I put this is my navbar template -
After
Quote:

<!-- / PAGENAV POPUP -->
</if>
add
Quote:

<div align="center">This web site is world ranked by <a href="http://www.alexa.com" target="_blank">Alexa</a> at position: {$vbulletin->alexarank}<br /><br /><a href="http://download.alexa.com/index.cgi"><img src="../banners/alexa_toolbar.gif" alt="Download Alexa Toolbar" border="0" /></a><br /><a href="http://download.alexa.com/index.cgi">Download Alexa toolbar</a></div>
Bob


All times are GMT. The time now is 11:10 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01619 seconds
  • Memory Usage 1,828KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (3)bbcode_html_printable
  • (4)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete