vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Create your own vBulletin page (https://vborg.vbsupport.ru/showthread.php?t=228112)

mort2412 11-27-2013 09:11 PM

How would I go about adding an external web link to appear in the page, similar to how panjo appears

thanks

BBNZowner 12-23-2013 11:08 PM

This is great. Just need to sort out my text coding and it will be sweet. Might even solve a few annoying errors I've had by using CMS articles as pages instead of custom pages.

usHealthy 02-05-2014 04:54 AM

Will love to see this working on v5

FelipeB 02-26-2014 06:01 PM

Hi, I'm new on this, and I'm having trouble to create a page out off the Forum root, inside the root everything is fine, but out side is without CSS...

My Forum is in:
/var/www/forum

My page is in:
/var/www/tests.php

This is my code...
Code:


// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################

define('THIS_SCRIPT', 'TEST');
define('CSRF_PROTECTION', true); 
// change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array('TEST',
);

// pre-cache templates used by specific actions
$actiontemplates = array();

// ######################### REQUIRE BACK-END ############################
// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line
chdir('/var/www/forum/');
require_once('./global.php');


// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$navbits = construct_navbits(array('' => 'TEST'));
$navbar = render_navbar_template($navbits);

// ###### YOUR CUSTOM CODE GOES HERE #####

$pagetitle = 'TEST';

// ###### NOW YOUR TEMPLATE IS BEING RENDERED ######

$templater = vB_Template::create('TEST');
$templater->register_page_templates();
$templater->register('navbar', $navbar);
$templater->register('pagetitle', $pagetitle);
print_output($templater->render());

and my tempate...
Code:


       
HTML Code:

       
{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
  <head>
    <title>{vb:raw vboptions.bbtitle} - {vb:raw pagetitle}</title>
    {vb:raw headinclude}
    {vb:raw headinclude_bottom}
  </head>
  <body>
   
    {vb:raw header}
   
    {vb:raw navbar}
   

    <div class="blockbody">
      <div class="blockrow">
                TEST
          </div>
    </div>
   
    {vb:raw footer}
       
  </body>
</html>




Eq4bits 02-26-2014 06:31 PM

you need to set an 'include' phrase that 'points' to the location of your css file

FelipeB 02-26-2014 06:42 PM

Could you show me?? As I say, I'm new on this, and don't have idea where is the CSS of Vbulletin...

MacroPhotoPro 02-28-2014 11:54 PM

1 Attachment(s)
Quote:

Originally Posted by Digital Jedi (Post 2459580)
That would be outside the scope of the article, since that's a Facebook thing. You would need to look at their documentation or articles such as this one for what you need to do control how thumbnails show up.


Hello again,

I am creating a photography database application, so sharing pictures is an absolute must. When a person is on the "view pic" page, a facebook link is there as well so that the person can share the pic on facebook.

I am able to share the post to the person's wall, successfully, but instead of presenting a thumbnail of my desired photo, all that is being posted is a thumbnail of my forum logo. I cannot figure out how to override this and include the desired picture in the Facebook popup for posting. I tried to follow the instructions on your link, and it simply doesn't work. It's beyond a FB problem, it's intrinsic to vBulletin, and it's driving me nuts.

Before I make the dynamic solution to this problem, my goal is to first establish a static proof-of-concept. Here is the html I am using in the root directory. Notice I am intending on using the Facebook OpenGraph tool to a linked picture:

It is as if all the custom "meta" tags are being completely ignored by something inside vBulletin.

How can I include a custom pic in my Facebook Shares? Your help is greatly appreciated.

Code:

<html>
<head>
        <meta property='fb:app_id' content='473597412755690' />
        <meta property='og:site_name' content='Nature Photography Resource & Database' />
        <meta property='og:description' content='Online community for dedicated macro photographers worldwide.' />
        <meta property='og:url' content='http://www.macrophotopro.com' />
        <meta property='og:type' content='website' />
        <meta property='og:image' content='http://www.macrophotopro.com/thumbnails/1/1_thumb_0000000548_tiny.jpg'>
</head>
       
<body>
        <div id='fb-root'></div>
        <script>(function(d, s, id) {
                  var js, fjs = d.getElementsByTagName(s)[0];
                  if (d.getElementById(id)) return;
                  js = d.createElement(s); js.id = id;
                  js.src = '//connect.facebook.net/en_US/all.js#xfbml=1&appId=473597412755690';
                  fjs.parentNode.insertBefore(js, fjs);
        }
        (document, 'script', 'facebook-jssdk'));
        </script>
       
       
        <div class='fb-share-button' data-href='http://www.macrophotopro.com/' data-type='button_count'>
        </div>
</body>
</html>

A pic of what happens when I click the Facebook button is shown in the attached Pic (notice that other metatags are also being completely ignored.)

This is the picture that SHOULD be appearing on the Share:

http://www.macrophotopro.com/thumbna...00548_tiny.jpg

However, the attached below (my forum logo) is what's actually getting displayed. What do I have to do to get the desired pic to override the default posting of the logo?

Help is greatly appreciated!

Lynne 03-01-2014 05:07 PM

Right now, if I go to your site, you have it turned off. That means an Unregistered user may not see a thing. And, if you are testing your script while it is turned off, remember that Facebook is an Unregistered User and so the only image they can grab is your logo.

MacroPhotoPro 03-01-2014 09:48 PM

Quote:

Originally Posted by Lynne (Post 2484484)
Right now, if I go to your site, you have it turned off. That means an Unregistered user may not see a thing. And, if you are testing your script while it is turned off, remember that Facebook is an Unregistered User and so the only image they can grab is your logo.

Hi Lynne;

I am not sure I made myself clear.

What we're trying to do has nothing to do with a person being registered, logged-in, or anything like that. This has to do with a Facebook "share" button on our custom page NOT being able to share a desired image onto FB. A person should NOT have to be registered onto my site, at all, for the share button to work nor for the image to be displayed. The share button works, and the image should display because of the coding, but yet it is not.

I do understand what you're saying about the forum being turned off, but we did test the procedure with it turned on, and still got the logo, not the desired image. The meta content is structured so that the spider image should display, but yet only the logo displays.

I believe vBulletin has some static, overriding code to where only vBulletin's logo displays (or whatever logo is up there), and we are trying to circumvent or identify this code and change it.

It should have absolutely nothing to do with whether a person is logged in to our site or not. In fact, the whole idea is to advertise to NON customers of our site, to Facebook, so they can click on the FB image and be taken back to our site. These people will not be customers, so their being logged in should have no bearing on seeing the image or not.

We believe we have the coding correctly ... we have the reference to the correct thumbnail ... yet it's showing only the logo.

What overriding code to we need to get rid of to get what we want displayed, displayed?

Thanks and I hope this was clear :)

Jack

PS: Click this link, click the FB button, and see what I mean: http://www.macrophotopro.com/fb.html

MacroPhotoPro 03-03-2014 04:29 PM

Hello ...


All times are GMT. The time now is 10:53 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.03406 seconds
  • Memory Usage 1,766KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (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