FM Design
Would you like to react to this message? Create an account in a few clicks or log in to continue.

IMPORTANT

FM Design is in read-only mode, please click here for more information.

Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49

» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21

» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28

» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15

» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11

» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24

» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58

» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50

» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22

» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12

» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10

» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51

» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11

» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19

» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34

Recent Tutorials
Top posting users this month

Who is online?
In total there are 48 users online :: 0 Registered, 0 Hidden and 48 Guests :: 2 Bots

None

[ View the whole list ]


Most users ever online was 515 on Tue 14 Sep 2021, 15:24

Possible widget?

Page 1 of 2 1, 2  Next

View previous topic View next topic Go down

FiB
FiB

Gender : Male
Posts : 185
Points : 3864
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://www.ourbulgariaforum.com

PostFiB Tue 17 Feb 2015, 05:16

I just wondered if anything like this as a widget was possible? This is shown for each individual member who is logged on ie since I was logged on it shows me and the links below available to me as Admin.



Possible widget? Captur10
naki
naki
New Member
Gender : Unspecified
Posts : 7
Points : 3925
Reputation : 0
Location : Kosova
Language : Albanian, English, polish
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
https://www.nasergashi.com https://www.facebook.com/naser.gashi

Postnaki Tue 17 Feb 2015, 07:50

Very nice and cool
Can you provide the css code so founders can create such cool widgets in their forums
FiB
FiB

Gender : Male
Posts : 185
Points : 3864
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://www.ourbulgariaforum.com

PostFiB Tue 17 Feb 2015, 07:52

I don't have the code Sad it's from my phpbb forum
naki
naki
New Member
Gender : Unspecified
Posts : 7
Points : 3925
Reputation : 0
Location : Kosova
Language : Albanian, English, polish
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
https://www.nasergashi.com https://www.facebook.com/naser.gashi

Postnaki Tue 17 Feb 2015, 07:54

Yea i visited your forum
Maybe Ange will do something Very Happy
FiB
FiB

Gender : Male
Posts : 185
Points : 3864
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://www.ourbulgariaforum.com

PostFiB Tue 17 Feb 2015, 07:56

Hope so it's a nifty looking widget and useful Wink If I knew where the code is stored I might be able to find it?
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12252
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Tue 17 Feb 2015, 19:16

You're using phpbb2 correct ? I wrote up something similar for it. It's not exact due to limitations on data, but it's the closest I can get. Smile

Go to Administration Panel > Modules > Forum widgets management > Create a new widget

Title(s) : User menu
Use a table type : Yes
Paste the code below and submit :
Code:
<style type="text/css">
#membre-profil a {
  font-size:10px;
  display:block;
  padding:3px 0 3px 12px;
  background:url(http://2img.net/i/fa/subsilver/right_arrow.gif) no-repeat 0 50%;
}
</style>
<div id="membre-profil">
  <div style="text-align:center;">
    <div class="fa-name"></div>
    <div class="fa-ava"></div>
    <div class="fa-rang"></div>
  </div>
  <hr/>
  <div class="link-list">
    <div>Menu</div>
    <a href="/search?search_id=newposts">View new posts (<span class="fa-newposts">0</span>)</a>
    <a href="/search?search_id=unanswered">View unanswered posts (<span class="fa-unanswered">0</span>)</a>
    <a href="/spa/" class="fa-named-url">View your posts (<span class="fa-posts">0</span>)</a>
    <a href="/search?search_id=favouritesearch">Favourites</a>
    <a href="/search?search_id=watchsearch">Watched topics</a>
    <a href="/privmsg?folder=inbox"><span class="fa-pm-new">0</span> new messages</a>
    <a href="/profile?mode=editprofile">Profile settings</a>
    <span class="fa-admin"></span>
    <a href="/login?logout=1">Logout [<span class="fa-name"></span>]</a>
  </div>
</div>

<script type="text/javascript">//<![CDATA[
(function() {
  var storage = window.localStorage, npm = document.getElementById('i_icon_mini_new_message');
  jQuery('.fa-name').html(_userdata.username);
  jQuery('.fa-posts').html(_userdata.user_posts);
  jQuery('.fa-ava').html(_userdata.avatar);
  jQuery('.fa-rang').html(_lang.rank_title);
  _userdata.user_level == 1 && jQuery('.fa-admin').html('<a href="/admin">Admin Panel</a>');
 
  jQuery('.fa-named-url').attr('href',jQuery('.fa-named-url').attr('href') + _userdata.username);
  npm && jQuery('.fa-pm-new').html(document.getElementById('i_icon_mini_new_message').title.match(/(\d+)/)[1]);
 
  if (storage.fa_dataEXP > +new Date - 4*59*1000) {
    jQuery('.fa-newposts').html(storage.fa_newposts);
    jQuery('.fa-unanswered').html(storage.fa_unanswered);
  } else {
    jQuery.get('/search?search_id=newposts',function(d){
      storage.fa_newposts = jQuery('h1.cattitle',d).text().match(/(\d+)/)[1];
      jQuery('.fa-newposts').html(storage.fa_newposts);
    });
    jQuery.get('/search?search_id=unanswered',function(d){
      storage.fa_unanswered = jQuery('h1.cattitle',d).text().match(/(\d+)/)[1];
      jQuery('.fa-unanswered').html(storage.fa_unanswered);
    });
    storage.fa_dataEXP = +new Date;
  }
})();
//]]></script>

This should give you the following result :
Possible widget? Captu105

To hide this from guests, click the permissions icone Possible widget? Perms and untick guests.
naki
naki
New Member
Gender : Unspecified
Posts : 7
Points : 3925
Reputation : 0
Location : Kosova
Language : Albanian, English, polish
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
https://www.nasergashi.com https://www.facebook.com/naser.gashi

Postnaki Tue 17 Feb 2015, 20:47

Nope,
He (Fib) is using another software i think is phpBB Group.
Checked in phpbb3 and not showing the same looks ugly. Nevermind thanks for the care Ange Smile
FiB
FiB

Gender : Male
Posts : 185
Points : 3864
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://www.ourbulgariaforum.com

PostFiB Wed 18 Feb 2015, 02:53

Yes And I am using phpbb2 and it works fine. You are a STAR thank you Possible widget? Bow
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12252
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Wed 18 Feb 2015, 17:14

@FiB you're welcome Mr. Green

@naki try this code for phpbb3 :
Code:
<style type="text/css">
#membre-profil .link-list a {
  font-size:10px;
  display:block;
  padding:3px 0 3px 8px;
  background:url(http://2img.net/i/fa/prosilver/arrow_right.gif) no-repeat 0 50%;
}
</style>
<div id="membre-profil">
  <div style="text-align:center;">
    <div><strong class="fa-name"></strong></div>
    <div class="fa-ava"></div>
    <div class="fa-rang"></div>
  </div>
  <hr/>
  <div class="link-list">
    <div class="h3">Menu</div>
    <a href="/search?search_id=newposts">View new posts (<span class="fa-newposts">0</span>)</a>
    <a href="/search?search_id=unanswered">View unanswered posts (<span class="fa-unanswered">0</span>)</a>
    <a href="/spa/" class="fa-named-url">View your posts (<span class="fa-posts">0</span>)</a>
    <a href="/search?search_id=favouritesearch">Favourites</a>
    <a href="/search?search_id=watchsearch">Watched topics</a>
    <a href="/privmsg?folder=inbox"><span class="fa-pm-new">0</span> new messages</a>
    <a href="/profile?mode=editprofile">Profile settings</a>
    <span class="fa-admin"></span>
    <a href="/login?logout=1">Logout [<span class="fa-name"></span>]</a>
  </div>
</div>

<script type="text/javascript">//<![CDATA[
(function() {
  var storage = window.localStorage, npm = document.getElementById('i_icon_mini_new_message');
  jQuery('.fa-name').html(_userdata.username);
  jQuery('.fa-posts').html(_userdata.user_posts);
  jQuery('.fa-ava').html(_userdata.avatar);
  jQuery('.fa-rang').html(_lang.rank_title);
  _userdata.user_level == 1 && jQuery('.fa-admin').html('<a href="/admin">Admin Panel</a>');
 
  jQuery('.fa-named-url').attr('href',jQuery('.fa-named-url').attr('href') + _userdata.username);
  npm && jQuery('.fa-pm-new').html(document.getElementById('i_icon_mini_new_message').title.match(/(\d+)/)[1]);
 
  if (storage.fa_dataEXP > +new Date - 4*59*1000) {
    jQuery('.fa-newposts').html(storage.fa_newposts);
    jQuery('.fa-unanswered').html(storage.fa_unanswered);
  } else {
    jQuery.get('/search?search_id=newposts',function(d){
      storage.fa_newposts = jQuery('h1.page-title',d).text().match(/(\d+)/) ? jQuery('h1.page-title',d).text().match(/(\d+)/)[1] : '0';
      jQuery('.fa-newposts').html(storage.fa_newposts);
    });
    jQuery.get('/search?search_id=unanswered',function(d){
      storage.fa_unanswered = jQuery('h1.page-title',d).text().match(/(\d+)/) ? jQuery('h1.page-title',d).text().match(/(\d+)/)[1] : '0';
      jQuery('.fa-unanswered').html(storage.fa_unanswered);
    });
    storage.fa_dataEXP = +new Date;
  }
})();
//]]></script>

You can modify the content of #membre-profil with CSS. Like the link list rule at the top. Smile
FISH CRAZY
FISH CRAZY

Gender : Male
Posts : 30
Points : 3706
Reputation : 12
Location : USA
Language : English / German
Browser : Browser : Internet Explorer Forum Version : Forum Version : Other
https://fishcrazyaquatics.4umotion.com/ https://www.facebook.com/pages/Fish-Crazy-Aquatics/4726729494127

PostFISH CRAZY Wed 18 Feb 2015, 23:15

Works nice Thanks Thumb right phpbb3 / phpbb2
FiB
FiB

Gender : Male
Posts : 185
Points : 3864
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://www.ourbulgariaforum.com

PostFiB Tue 03 Mar 2015, 10:25

I'm not sure if the counter is working ? perhaps I won't be able to tell untill my members move over and start posting? although I do have a test member I have posted with but I think the system may be picking up on the same ip so it won't show as a new post to me.

Possible widget? Captur22
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12252
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Wed 04 Mar 2015, 00:17

Since we have to send a request to get that data, I've cached the results for 5 minutes ( 4*59*1000 ). So some changes may take a few minutes to be visible; you'll see data from 5 minutes ago.
FiB
FiB

Gender : Male
Posts : 185
Points : 3864
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://www.ourbulgariaforum.com

PostFiB Wed 04 Mar 2015, 09:27

It still doesn't seem to be working, image 1 shows a new post but the widget shows zero.

Possible widget? T10

Possible widget? T110
Andiweb
Andiweb

Gender : Unspecified
Posts : 64
Points : 3655
Reputation : 1
Language : Albanian
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other

PostAndiweb Wed 04 Mar 2015, 13:04

Same problem here reflect
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12252
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Thu 05 Mar 2015, 04:09

@FiB what displays when you click the view new posts link ?
FiB
FiB

Gender : Male
Posts : 185
Points : 3864
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://www.ourbulgariaforum.com

PostFiB Thu 05 Mar 2015, 04:14

It will show all new posts. so it works if you click it but it doesn't show any on the widget it's always '0'
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12252
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Thu 05 Mar 2015, 04:17

I will have to take a look at it. Does the numeric value change after 5 minutes has passed ? I should have added a refresh button so you could force it. reflect
FiB
FiB

Gender : Male
Posts : 185
Points : 3864
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://www.ourbulgariaforum.com

PostFiB Thu 05 Mar 2015, 04:18

No nothing changes except it shows me the new posts Shocked


Last edited by FiB on Thu 05 Mar 2015, 13:54; edited 1 time in total
Andiweb
Andiweb

Gender : Unspecified
Posts : 64
Points : 3655
Reputation : 1
Language : Albanian
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other

PostAndiweb Thu 05 Mar 2015, 04:20

an automatic autorefresh will be good
FiB
FiB

Gender : Male
Posts : 185
Points : 3864
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://www.ourbulgariaforum.com

PostFiB Fri 06 Mar 2015, 13:31

In my simple thinking Embarassed I tried refreshing the page but it made no difference Sad
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12252
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Sun 08 Mar 2015, 03:21

Try this :
Code:
<style type="text/css">
#membre-profil a {
  font-size:10px;
  display:block;
  padding:3px 0 3px 12px;
  background:url(http://2img.net/i/fa/subsilver/right_arrow.gif) no-repeat 0 50%;
}
</style>
<div id="membre-profil">
  <div style="text-align:center;">
    <div class="fa-name"></div>
    <div class="fa-ava"></div>
    <div class="fa-rang"></div>
  </div>
  <hr/>
  <div class="link-list">
    <div>Menu</div>
    <a href="/search?search_id=newposts">View new posts (<span class="fa-newposts">0</span>)</a>
    <a href="/search?search_id=unanswered">View unanswered posts (<span class="fa-unanswered">0</span>)</a>
    <a href="/spa/" class="fa-named-url">View your posts (<span class="fa-posts">0</span>)</a>
    <a href="/search?search_id=favouritesearch">Favourites</a>
    <a href="/search?search_id=watchsearch">Watched topics</a>
    <a href="/privmsg?folder=inbox"><span class="fa-pm-new">0</span> new messages</a>
    <a href="/profile?mode=editprofile">Profile settings</a>
    <span class="fa-admin"></span>
    <a href="/login?logout=1">Logout [<span class="fa-name"></span>]</a>
  </div>
  <div style="padding:3px;text-align:center;"><a href="#" id="refresh_data">Refresh</a></div>
</div>

<script type="text/javascript">//<![CDATA[
(function() {
  var storage = window.localStorage, npm = document.getElementById('i_icon_mini_new_message'), ref = document.getElementById('refresh_data');
  jQuery('.fa-name').html(_userdata.username);
  jQuery('.fa-posts').html(_userdata.user_posts);
  jQuery('.fa-ava').html(_userdata.avatar);
  jQuery('.fa-rang').html(_lang.rank_title);
  _userdata.user_level == 1 && jQuery('.fa-admin').html('<a href="/admin">Admin Panel</a>');
 
  jQuery('.fa-named-url').attr('href',jQuery('.fa-named-url').attr('href') + _userdata.username);
  npm && jQuery('.fa-pm-new').html(document.getElementById('i_icon_mini_new_message').title.match(/(\d+)/)[1]);
 
  if (storage.fa_dataEXP > +new Date - 4*59*1000) {
    jQuery('.fa-newposts').html(storage.fa_newposts);
    jQuery('.fa-unanswered').html(storage.fa_unanswered);
  } else getData();
   
  ref.onclick = function() {
    ref.style.opacity = 0.3;
    getData(function(){ ref.style.opacity = 1 });
    return false;
  };
   
  function getData(cb) {
    jQuery.get('/search?search_id=newposts',function(d){
      storage.fa_newposts = jQuery('h1.cattitle',d).text().match(/(\d+)/) ? jQuery('h1.cattitle',d).text().match(/(\d+)/)[1] : 0;
      jQuery('.fa-newposts').html(storage.fa_newposts);
    });
    jQuery.get('/search?search_id=unanswered',function(d){
      storage.fa_unanswered = jQuery('h1.cattitle',d).text().match(/(\d+)/) ? jQuery('h1.cattitle',d).text().match(/(\d+)/)[1] : 0;
      jQuery('.fa-unanswered').html(storage.fa_unanswered);
      cb && cb();
    });
    storage.fa_dataEXP = +new Date;
  }
})();
//]]></script>

I added an extra check and a refresh button.
Andiweb
Andiweb

Gender : Unspecified
Posts : 64
Points : 3655
Reputation : 1
Language : Albanian
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other

PostAndiweb Sun 08 Mar 2015, 03:37

the refresh button need to refresh all the page ?
FiB
FiB

Gender : Male
Posts : 185
Points : 3864
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://www.ourbulgariaforum.com

PostFiB Sun 08 Mar 2015, 06:42

Still not working but if I click the view new posts it takes me to the new posts. reflect
FiB
FiB

Gender : Male
Posts : 185
Points : 3864
Reputation : 14
Location : UK
Language : Eng
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB2
http://www.ourbulgariaforum.com

PostFiB Mon 09 Mar 2015, 11:15

Andiweb wrote:the refresh button need to refresh all the page ?

You had any luck with it yet? @Andiweb
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12252
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Mon 09 Mar 2015, 14:09

It appears to be working for me, as you can see :
Possible widget? Captu119

When you added the widget, did you make sure that you pasted it in source mode ?
Sponsored content

PostSponsored content

Page 1 of 2 1, 2  Next

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

 
Permissions in this forum:
You cannot reply to topics in this forum