The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Make These "::" Things Go Way!

View previous topic View next topic Go down

Solved Make These "::" Things Go Way!

Post by Ailyn on April 3rd 2017, 10:22 am

So, I'm wracking my brain here. It seems that these "::" Marks used in the photo below are attached to the variable {NAV_CAT_DESC} in the template "viewforum_body". There's also a god awful extra space used in them that just looks unprofessional.



I'd like to change them to the circles that are used on the main index page (example outlined in brown in the picture below):


The boxes outlined in red and blue also give examples of where the "::" marks and extra spacing (the red box shows a space before "In total there are...") are used and I'd like to get rid of. Is there a way to change this in their respective variables by way of CSS and span tags? I've noticed some other skin templates get rid of these marks but I can't pinpoint how they're modified.

Please help!
avatar
Ailyn
Forumember

Female Posts : 25
Reputation : 3
Language : English
Location : Oregon

http://amandatest.forumotion.com

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by SarkZKalie on April 3rd 2017, 12:32 pm

Could you please provide your forum URL here? Very Happy
avatar
SarkZKalie
Forumember

Male Posts : 500
Reputation : 82
Language : English

http://rotavn.nstars.org/

Back to top Go down

Solved Great Things To add

Post by admin1986 on April 3rd 2017, 12:48 pm

Wow
Implementing good things in forum help us to develop good
avatar
admin1986
New Member

Male Posts : 4
Reputation : 1
Language : English

https://goo.gl/znWkfF

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by Ailyn on April 3rd 2017, 2:02 pm

@SarkZKalie wrote:Could you please provide your forum URL here? Very Happy

http://guardian-ascension.forumotion.com/

But its the same issue that all basic starter forums have.
avatar
Ailyn
Forumember

Female Posts : 25
Reputation : 3
Language : English
Location : Oregon

http://amandatest.forumotion.com

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by Luffy on April 3rd 2017, 3:49 pm

@admin1986 wrote:Wow
Implementing good things in forum help us to develop good
Please avoid useless posts. If your post does not provide any solution to the author's problem, you can open a new topic for your problem or send the author a pm for your comments. Thanks!





avatar
Luffy
Manager
Manager

Male Posts : 4478
Reputation : 451
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by DSorcerer on April 3rd 2017, 4:29 pm

I created a test account. Could you accept it? Razz I'm sure it's possible since: http://help.forumotion.com/t136323-modify-the-brackets-on-the-group-legend#919431 <- nevermind
Anyway, I found another way: JavaScript. Go to Admin Panel -> Modules -> HTML&JavaScript -> JavaScript codes management -> Create a new JavaScript.
Select "all the pages" and name it how do you want to.
Code:
$(document).ready(function(){
$('ul.linklist:contains("::")').each(function(){
  $(this).html($(this).html().split("::").join(""));
});
  });
I tried and it worked.
To add other symbol (like *, ♥ etc.) you should edit this part:
Code:
.join("YOUR_SYMBOL_HERE"));
And legend thing:
Code:
$(document).ready(function(){
  $('em:contains("Legend :")').each(function(){
    $(this).html($(this).html().split("Legend :").join("Legend:"));
});
  });
Create another script for that please.
avatar
DSorcerer
Forumember

Male Posts : 37
Reputation : 6
Language : Polish
Location : Poland. help

http://winx-rp.forumotion.pl

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by Ailyn on April 3rd 2017, 10:09 pm

@DSorcerer wrote:
Anyway, I found another way: JavaScript. Go to Admin Panel -> Modules -> HTML&JavaScript -> JavaScript codes management -> Create a new JavaScript.
Select "all the pages" and name it how do you want to.
Code:
$(document).ready(function(){
$('ul.linklist:contains("::")').each(function(){
  $(this).html($(this).html().split("::").join(""));
});
  });
I tried and it worked.
To add other symbol (like *, ♥ etc.) you should edit this part:
Code:
.join("YOUR_SYMBOL_HERE"));
And legend thing:
Code:
$(document).ready(function(){
  $('em:contains("Legend :")').each(function(){
    $(this).html($(this).html().split("Legend :").join("Legend:"));
});
  });
Create another script for that please.

Not sure what I did wrong, but neither code anything :/ I followed your directions precisely.

The link I gave you was to my fiance's page, but I should have directed you to my code testing forum http://amandatest.forumotion.com/ instead because it has the same problems.

Is that script basically getting rid of the marks and the padding around them? This skin/theme seems to be laden with grammatical errors (like extra spaces willy-nilly and lower case letters at the start of sentences) that we'd really like to get rid of and don't plan on using a different version outside of this one because we really don't understand much about coding. :/
avatar
Ailyn
Forumember

Female Posts : 25
Reputation : 3
Language : English
Location : Oregon

http://amandatest.forumotion.com

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by APE on April 3rd 2017, 10:12 pm

I have also tested this code and it Don't work



avatar
APE
Manager
Manager

Male Posts : 9645
Reputation : 872
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by Ailyn on April 3rd 2017, 10:24 pm

So is there really no way to alter the Variables? How do other themes make these problems go away?

I found this on StackOverflow, but I don't fully understand how to possibly implement it:
Code:
function replaceText(selector, text, newText, flags) {
  var matcher = new RegExp(text, flags);
  var elems = document.querySelectorAll(selector), i;

  for (i = 0; i < elems.length; i++)
    if (!elems[i].childNodes.length)
      elems[i].innerHTML = elems[i].innerHTML.replace(matcher, newText);
}

Any ideas?
Edit: So I figured out that the extra spaces for the Legend and at the start of the users online part could be fixed in the template. So now my main focus is getting rid of those two ::'s and replacing them along with getting rid of spacing gaps in the profile area as well. I can see you can replace the lines in the Legend area, but how can I make that work with every other instance of it? (I realize this would mean special code for every instance, but I don't mind that.
avatar
Ailyn
Forumember

Female Posts : 25
Reputation : 3
Language : English
Location : Oregon

http://amandatest.forumotion.com

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by DSorcerer on April 3rd 2017, 11:57 pm

Try to define other selector, maybe that was just in my template which is a bit modified.
avatar
DSorcerer
Forumember

Male Posts : 37
Reputation : 6
Language : Polish
Location : Poland. help

http://winx-rp.forumotion.pl

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by Ailyn on April 4th 2017, 12:01 am

@DSorcerer wrote:Try to define other selector, maybe that was just in my template which is a bit modified.

I'm sorry, my knowledge of JS is super limited and I'm not sure what you mean. :/ Could you possibly elaborate?
avatar
Ailyn
Forumember

Female Posts : 25
Reputation : 3
Language : English
Location : Oregon

http://amandatest.forumotion.com

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by DSorcerer on April 4th 2017, 12:07 am

Well, I meant selector like p, h2 etc. but more complicated xD In jQuery all the css selectors work. You should set it. You can of course use a browser console to look how HTML is going. I can do nothing because I am on mobile.
avatar
DSorcerer
Forumember

Male Posts : 37
Reputation : 6
Language : Polish
Location : Poland. help

http://winx-rp.forumotion.pl

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by DSorcerer on April 4th 2017, 12:32 am

Hmm, I think you can replace ul.linklist by #navigation in the first code. I see this span has an ID.

Oh boy, this was supposed to be an edit of my previous message xD Sorry.
avatar
DSorcerer
Forumember

Male Posts : 37
Reputation : 6
Language : Polish
Location : Poland. help

http://winx-rp.forumotion.pl

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by SLGray on April 4th 2017, 1:01 am

This is the CSS selector for that part:
Code:
.pathname-box

That also could be in one of the templates. If you can locate it in the template, you should be able to modify the ::.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 38225
Reputation : 2574
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by Ailyn on April 4th 2017, 1:39 am

I got the code to work on almost all of it!

Code:
$(document).ready(function(){
$('#double:contains(" ::")').each(function(){
  $(this).html($(this).html().split(" ::").join(":"));
});
  });

I did run into an issue over on the Viewtopic_body template page. The first instance of {NAV_CAT_DESC} takes its span tag ok and does what I need it to do, but this one down here, which resides at the bottom of the page, won't take the change even with the span tag. Is this a tag nesting issue?

Code:
<div class="pathname-box">
      <p><a class="nav" href="{U_INDEX}">{L_INDEX}</a>{NAV_SEP}<a class="nav" href="{U_ALBUM}">{L_ALBUM}</a><span id="double">{NAV_CAT_DESC}</span></p>
          </div>



Last edited by Ailyn on April 4th 2017, 1:59 am; edited 1 time in total
avatar
Ailyn
Forumember

Female Posts : 25
Reputation : 3
Language : English
Location : Oregon

http://amandatest.forumotion.com

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by APE on April 4th 2017, 1:54 am

@DSorcerer wrote:Well, I meant selector like p, h2 etc. but more complicated xD In jQuery all the css selectors work. You should set it. You can of course use a browser console to look how HTML is going. I can do nothing because I am on mobile.

@DSorcerer wrote:Hmm, I think you can replace ul.linklist by #navigation in the first code. I see this span has an ID.

Oh boy, this was supposed to be an edit of my previous message xD Sorry.

@DSorcerer
Please don't double post. Your posts need to be separated by 24 hours before bumping. Please use the edit button, instead!
Please read our forum rules: ESF General Rules



avatar
APE
Manager
Manager

Male Posts : 9645
Reputation : 872
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by Ailyn on April 4th 2017, 1:57 am

Which is kinda weird because when I remove that {NAV_CAT_DESC} from there, it makes the part in the red box in the picture disappear. That's how I made sure I was working with the right one.



Edit: And now I look like I'm talking to no one xD


Last edited by Ailyn on April 4th 2017, 1:59 am; edited 1 time in total
avatar
Ailyn
Forumember

Female Posts : 25
Reputation : 3
Language : English
Location : Oregon

http://amandatest.forumotion.com

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by DSorcerer on April 4th 2017, 1:58 am

Yep, you should do that in who is online template. Or with selector of p in who is online box.
@APE, I know, I was on mobile and Chrome sucks with smoothness of browsing :/ sorry again.
avatar
DSorcerer
Forumember

Male Posts : 37
Reputation : 6
Language : Polish
Location : Poland. help

http://winx-rp.forumotion.pl

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by SarkZKalie on April 4th 2017, 10:11 am

PHPBB3 i think?
avatar
SarkZKalie
Forumember

Male Posts : 500
Reputation : 82
Language : English

http://rotavn.nstars.org/

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by DSorcerer on April 4th 2017, 2:44 pm

Yes, it's phpbb3.
Ahh I see them now. Please try to use this instead:
Code:
$(document).ready(function(){
  $('div.pathname-box > p:contains("::")').each(function(){
    $(this).html($(this).html().split("::").join(""));
});
  });
avatar
DSorcerer
Forumember

Male Posts : 37
Reputation : 6
Language : Polish
Location : Poland. help

http://winx-rp.forumotion.pl

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by Ailyn on April 6th 2017, 1:09 am

That worked perfectly! Thanks Smile

I've got one last question and then I'll mark this as solved: where do I find the templates for editing the way profile's look? Specifically, I want to change how this page looks



I just can't seem to find out where the variables are that control that extra space issue next to "Gender, Posts, Birthday etc".
avatar
Ailyn
Forumember

Female Posts : 25
Reputation : 3
Language : English
Location : Oregon

http://amandatest.forumotion.com

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by APE on April 6th 2017, 3:45 pm

Hello you need to make new thread for your new question so others can search the same problem.

so please make a new thread for this thank you.



avatar
APE
Manager
Manager

Male Posts : 9645
Reputation : 872
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by DSorcerer on April 7th 2017, 3:34 pm

Is this solved or do you need any help with this issue?
avatar
DSorcerer
Forumember

Male Posts : 37
Reputation : 6
Language : Polish
Location : Poland. help

http://winx-rp.forumotion.pl

Back to top Go down

Solved Re: Make These "::" Things Go Way!

Post by APE on April 7th 2017, 6:31 pm

Problem solved & topic archived.
Please read our forum rules: ESF General Rules



avatar
APE
Manager
Manager

Male Posts : 9645
Reputation : 872
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

View previous topic View next topic Back to top


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