Thanks button / reputation
Ελληνική Κοινότητα Υποστήριξης ForumGreek :: ΤΟΜΕΑΣ ΥΠΟΣΤΗΡΙΞΗΣ :: Προβλήματα με Κώδικες (Προγραμματισμός) :: Αρχείο Προβλημάτων με Κώδικες
Σελίδα 1 από 1 • Μοιραστείτε
Thanks button / reputation
1) Θελω το μήνυμα ευχαριστω να είναι κεντραρισμένο
και 2) θέλω να κάνουν Like και οι επισκέπτες
σημ. συγνωμη για την πληθωρα ερωτήσεων σήμερα
- Κώδικας:
$(function() {
var message = function(child, parent) {
var pseudo = $(child, parent).text(),
icon = '<img src="http://i18.servimg.com/u/f18/18/21/60/73/fa_sta10.png" alt=""/>';
return '<div id="fa_thanks_message">' icon ' Ο συγγραφέας σου είπε ευχαριστώ, ' pseudo ' ! ' icon '</div>';
},
version = $('.bodylinewidth')[0] ? 0 : document.getElementById('wrap') ? 1 : $('.pun')[0] ? 2 : document.getElementById('ipbwrapper') ? 3 : 'badapple', // version check
node = document.createElement(version ? 'DIV' : 'TR'),
post = $(version ? 'div' : 'tr' '.post'),
j = post.length,
i = 0;
if (version == 'badapple') {
if (window.console) console.error('This plugin is not optimized for your forum version. Please contact the support for further assistance.');
return;
}
node.id = 'fa_thanks'; // id for style modifications
if (!version) node.innerHTML = '<td colspan="2"></td>'; // phpbb2 must have a cell as the child node
for (; i < j; i ) {
if ((version ? post[i] : post[i].firstChild).style.backgroundColor) { // thanked posts have the backgroundColor style property
post[i].className = ' thanked'; // mark the thanked post with a class
(version ? node : node.firstChild).innerHTML = message(['.name', 'dl > dt > strong', '.username', '.popmenubutton'][version], post[i]); // thanks message
switch (version) {
case 0 : // phpbb2
node.firstChild.style.backgroundColor = post[i].firstChild.style.backgroundColor;
node.firstChild.className = post[i].firstChild.className;
post[i].parentNode.insertBefore(node, post[i].nextSibling);
break;
case 1 : // phpbb3
post[i].firstChild.insertBefore(node, post[i].firstChild.lastChild.previousSibling);
break;
case 2 : // punbb
node.className = 'postfoot';
node.style.margin = '0';
post[i].appendChild(node);
break;
case 3 : // invision
node.className = 'post-footer';
node.style.backgroundColor = post[i].style.backgroundColor;
post[i].appendChild(node);
break;
}
break; // break out of the for loop when the thanked post is found
}
}
});
και 2) θέλω να κάνουν Like και οι επισκέπτες
σημ. συγνωμη για την πληθωρα ερωτήσεων σήμερα
Έχει επεξεργασθεί από τον/την Skouliki στις Τρι Φεβ 23, 2016 5:26 pm, 1 φορά
Skouliki- Υπεύθυνος Φόρουμ
-
Δημοσιεύσεις : 1027
Απ: Thanks button / reputation
Καλησπέρα,
Άλλαξε τον κώδικα σου με τον παρακάτω κώδικα:
Δεν εμφανίζεται το like στους επισκέπτες;
Άλλαξε τον κώδικα σου με τον παρακάτω κώδικα:
- Κώδικας:
$(function() {
var message = function(child, parent) {
var pseudo = $(child, parent).text(),
icon = '<img src="http://i18.servimg.com/u/f18/18/21/60/73/fa_sta10.png" alt=""/>';
return '<div id="fa_thanks_message"><center>' + icon + ' Ο συγγραφέας σου είπε ευχαριστώ, ' + pseudo + ' ! ' + icon + '</center></div>';
},
version = $('.bodylinewidth')[0] ? 0 : document.getElementById('wrap') ? 1 : $('.pun')[0] ? 2 : document.getElementById('ipbwrapper') ? 3 : 'badapple', // version check
node = document.createElement(version ? 'DIV' : 'TR'),
post = $(version ? 'div' : 'tr' + '.post'),
j = post.length,
i = 0;
if (version == 'badapple') {
if (window.console) console.error('This plugin is not optimized for your forum version. Please contact the support for further assistance.');
return;
}
node.id = 'fa_thanks'; // id for style modifications
if (!version) node.innerHTML = '<td colspan="2"></td>'; // phpbb2 must have a cell as the child node
for (; i < j; i++) {
if ((version ? post[i] : post[i].firstChild).style.backgroundColor) { // thanked posts have the backgroundColor style property
post[i].className += ' thanked'; // mark the thanked post with a class
(version ? node : node.firstChild).innerHTML = message(['.name', 'dl > dt > strong', '.username', '.popmenubutton'][version], post[i]); // thanks message
switch (version) {
case 0 : // phpbb2
node.firstChild.style.backgroundColor = post[i].firstChild.style.backgroundColor;
node.firstChild.className = post[i].firstChild.className;
post[i].parentNode.insertBefore(node, post[i].nextSibling);
break;
case 1 : // phpbb3
post[i].firstChild.insertBefore(node, post[i].firstChild.lastChild.previousSibling);
break;
case 2 : // punbb
node.className = 'postfoot';
node.style.margin = '0';
post[i].appendChild(node);
break;
case 3 : // invision
node.className = 'post-footer';
node.style.backgroundColor = post[i].style.backgroundColor;
post[i].appendChild(node);
break;
}
break; // break out of the for loop when the thanked post is found
}
}
});
Δεν εμφανίζεται το like στους επισκέπτες;
Van-Helsing- Διαχειριστής
-
Ηλικία : 49
Δημοσιεύσεις : 1990
Απ: Thanks button / reputation
εμφανίζεται όπου έχει γίνει like.. σε οποιο θεμα δεν εχει like δεν δειχνει κάτι
εγω θέλω να μπορούν να πατησουν Like
edit.thanks button λύθηκε
εγω θέλω να μπορούν να πατησουν Like
edit.thanks button λύθηκε
Skouliki- Υπεύθυνος Φόρουμ
-
Δημοσιεύσεις : 1027
Απ: Thanks button / reputation
Έστειλα το ερώτημα στους τεχνικούς και όπως με ενημέρωσαν δυστυχώς οι επισκέπτες δεν μπορούν ψηφίσουν τα θέματα με τη μέθοδο του Like/Μου αρέσει.
Van-Helsing- Διαχειριστής
-
Ηλικία : 49
Δημοσιεύσεις : 1990
Απ: Thanks button / reputation
οκ ...να το ξέρουμε..ωραια αρα ειμαστε οκ
Skouliki- Υπεύθυνος Φόρουμ
-
Δημοσιεύσεις : 1027
Απ: Thanks button / reputation
Οκ ναι γιατί μπορεί να ρωτήσει και κάποιο άλλο μέλος.
Λύθηκε το θέμα με το κεντράρισμα;
Λύθηκε το θέμα με το κεντράρισμα;
Van-Helsing- Διαχειριστής
-
Ηλικία : 49
Δημοσιεύσεις : 1990
Απ: Thanks button / reputation
To θέμα λύθηκε, κλειδώθηκε και αρχειοθετήθηκε.
Van-Helsing- Διαχειριστής
-
Ηλικία : 49
Δημοσιεύσεις : 1990
Παρόμοια θέματα
» google button
» Δεν μου δουλεύει το like button
» Ανα2ήτηση Button
» scroll to top button
» online status button
» Δεν μου δουλεύει το like button
» Ανα2ήτηση Button
» scroll to top button
» online status button
Ελληνική Κοινότητα Υποστήριξης ForumGreek :: ΤΟΜΕΑΣ ΥΠΟΣΤΗΡΙΞΗΣ :: Προβλήματα με Κώδικες (Προγραμματισμός) :: Αρχείο Προβλημάτων με Κώδικες
Σελίδα 1 από 1
Δικαιώματα σας στην κατηγορία αυτή
Δεν μπορείτε να απαντήσετε στα Θέματα αυτής της Δ.Συζήτησης
|
|