|
Schulpastoral und Internet
Themen Specials
Suche auf www.schulpastoral.de
Bibliothek auf www.rpi-virtuell.de
|
Home
>>
RSS Center
>>
Social Media quick tutorial for XOOPS
RSS Center
XOOPS.org
(08.12.2025 02:40)
Social Media quick tutorial for XOOPS
(03.03.2012 12:07)
First of all, you are more than welcome to use any of this, most of what I've done was pieced together from my own bug/debug process.
I use everything here on my news website at http://kbkw.com I think I included everything, but please feel free to contact me if you have questions. This could all be seen as continuation of this article at http://xoops.org/modules/news/article.php?storyid_=6044 META I add the following to my Meta tags (In the template)
< meta property = "og:type" content =
"article" />
I add some If/Then statements that will populate other facebook values IF we're viewing a story. (IF the story.hits variable is empty then we're not viewing an article)
<{if $story . hits != '' }>
Same as above, but for the debaser module
<{elseif $addinfo != '' }>
This uses news 1.65's "Select a picture to attach to the news"
<{if $articlePicture != '' }>
then from here down we populate variables for the "rest of the pages," and close out our IF statement
<{else}>
lastly I add keywords because facebook pulls this meta before it's own for some reason..
< meta name = "keywords" content =
"<{$xoops_pagetitle}>, <{$xoops_meta_keywords}>" />
TEMPLATES Now in the news_item.html template I add a check for the proper topic:
<{if $story . topic_title | strip_tags
: false == "Local News" }>
Followed by my "social bar"
<!-- Social BEGIN -->
By adding this in the news_item template instead of _article, You see the social icons at the bottom of every story when viewing the entire topic - and the links track through to the stories, so you could "like" every story on a page with a few clicks. **Note: Pinterest requires this additional js at the top of the page (I put mine in both news_index.html and news_article.html
< script type = "text/java_script" >
Finally, I add the following code near the bottom of the news_article.html template for the "Chat" plugin from facebook
< fb
: comments ? numposts = "15" <
div class_= "fb-comments"
data - href = "<{$xoops_url}>/modules/news/article.php?storyid_=<{$story.id}>" ></ fb : comments
>
execution time : 0.042 sec
|