vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   New Posting Features - Digg.com System Integration (https://vborg.vbsupport.ru/showthread.php?t=139462)

ZomgStuff 02-14-2007 10:00 PM

Digg.com System Integration
 
Well I haven't seen this posted yet so I'll give it a crack.
Digg.com will bring your site huge traffic, trust me.
A friend and I made this where you can click "digg this" in a thread and then embed the "digg me" button in a thread.

Screenshots are below.


Admin CP -> Custom BB Code -> Add New BB Code

Code:

Title: Digg

Tag: digg

Replacement: <script>
digg_url = '{param}';
</script>
<script src="http://digg.com/api/diggthis.js"></script>

Example: [digg]http://digg.com/programming/Xfire_Game_Spoofing[/digg]

Description: [digg]URL TO ARTICLE[/digg]. Allows you to enter a counter for digg.


Button Image: You can borrow mine. http://www.zomgstuff.net/forum/images/techtwo/editor/digg.gif

Now for the template edit for your submit link to be on the thread.
Admin CP -> Styles and Templates -> Style Manager -> Edit Template -> postbit_legacy.
and
Admin CP -> Styles and Templates -> Style Manager -> Edit Template -> postbit
Code:


<A HREF="http://digg.com/submit?phase=2&url=http://www.url.net/forum/showthread.php?$session[sessionurl]p=$post[postid]&title=$post[title]" target="_blank"><img src="IMAGEHERE" border=0></A>

You can get the images for the thread here:
http://digg.com/tools/buttons

Screenshot:
http://img219.imageshack.us/img219/1613/sn1ow5.jpg
http://img292.imageshack.us/img292/5140/sn2rt0.jpg

AresGW 02-15-2007 02:39 AM

For the template code... which template do we put that in?

Thanks

flamewalker 02-15-2007 02:57 AM

postbit_legacy... but i can't get this to work, always says "This doesn't look like a valid url!

Snake 02-15-2007 07:13 AM

Haha where is t he download link? :D

simalert 02-15-2007 10:57 AM

Quote:

Originally Posted by flamewalker (Post 1182958)
postbit_legacy... but i can't get this to work, always says "This doesn't look like a valid url!

It works perfectly for me. Did you remember to change the URL for your own and not use the example one?

ZomgStuff 02-15-2007 12:04 PM

Quote:

Originally Posted by Snake (Post 1183041)
Haha where is t he download link? :D

There is no download, just this template change. I guess I placed this in the wrong seciton sorry! I just signed up here last night so I was't too familiar where everything went

projectego 02-15-2007 01:39 PM

Awesome idea for a mod! Nice work. ;)

CBrown 02-15-2007 02:58 PM

Where "exactly" am I putting that code in my postbit_legacy template? Before/after with a condition? I'm new at this.. sorry. Love the mod idea.

simalert 02-15-2007 03:04 PM

You can put it anywhere you want, it depends where on the screen you want it to appear.

I wanted mine appearing before the 'Thanks' button that's part of the thanks hack so I added it before that. If I didn't have the thanks hack I'd have looked for the edit button code and placed it before that. This would have then put the link at the bottom of the post window by the edit and quote buttons.

Don't forget to change the image part too so it's a valid image.

ZomgStuff 02-15-2007 03:10 PM

Depends on where you want it. The simplest way is to copy the entire code for the template, paste it in Dreamweaver and place your mouse where you want it to be, then paste the code. Here is where I placed mine (in postbit), although I don't know if it will be the same for you because my template is heavily modded.

After
Code:

<div class="normal">
                        <a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a><if condition="$show['inlinemod']"><input type="checkbox" name="plist[$postid]" id="plist_$postid" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" /></if>
                </div>
                        <!-- / status icon and date -->                               
                </td>
               
                <td class="thead" style="font-weight:normal">
               
        <div class="normal" style="float:$stylevar[right]">

and before
Code:

<if condition="$show['postcount']">(#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]">$post[postcount]</a>)</if>


All times are GMT. The time now is 07:46 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.03687 seconds
  • Memory Usage 1,737KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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